Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use crossbeam::thread::Scope;
- fn main(){
- let array = [1, 2, 3];
- let _ = crossbeam::scope(|scope: &Scope| {
- for i in &array {
- scope.spawn(move |_| {
- println!("element: {}", i);
- });
- }
- });
- //crossbeam::scope(myfn);
- }
Add Comment
Please, Sign In to add comment