Created
September 21, 2022 22:57
-
-
Save adkri/c4695ac0cefd3d99d346433c79b2f889 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let pool = rayon::ThreadPoolBuilder::new() | |
| .num_threads(256) | |
| .build() | |
| .unwrap(); | |
| pool.install(|| { | |
| let run_result: Vec<ResultingThing> = my_things | |
| .into_par_iter() | |
| .map(crate::do_something) | |
| .collect(); | |
| for thing in run_result { | |
| println!("{:?}: ", thing); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment