Created
September 21, 2022 22:57
-
-
Save adkri/c4695ac0cefd3d99d346433c79b2f889 to your computer and use it in GitHub Desktop.
Revisions
-
adkri revised this gist
Sep 21, 2022 . No changes.There are no files selected for viewing
-
adkri revised this gist
Sep 21, 2022 . No changes.There are no files selected for viewing
-
adkri created this gist
Sep 21, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ 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); } });