We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbb9396 commit 13910d4Copy full SHA for 13910d4
src/librustc_data_structures/sync.rs
@@ -199,6 +199,10 @@ cfg_if! {
199
f(&SerialScope)
200
}
201
202
+ pub fn spawn(f: impl FnOnce() + 'static) {
203
+ f()
204
+ }
205
+
206
#[macro_export]
207
macro_rules! parallel {
208
($($blocks:tt),*) => {
@@ -385,7 +389,7 @@ cfg_if! {
385
389
386
390
use std;
387
391
use std::thread;
388
- pub use rayon::{join, scope};
392
+ pub use rayon::{join, scope, spawn};
393
394
/// Runs a list of blocks in parallel. The first block is executed immediately on
395
/// the current thread. Use that for the longest running block.
0 commit comments