Example: ScopedThreadBuilder<'scope, 'env> crossbeam::scope(|s| s.builder().spawn(|| println!("hi!"))); 'scope refers to variable s and ensures the builder doesn't escape the scope. 'env refers to the environment outside the scope and tells the spawned thread what it can borrow.
-
This Tweet is unavailable.
-
Link to the implementation: https://github.com/crossbeam-rs/crossbeam-utils/blob/6756505c945ef50841c9746850626f014eecc4a5/src/thread.rs#L304 …
1:56 PM - 30 Jul 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.