Skip to content

Commit

Permalink
Merge pull request #1802 from alexcrichton/switch-cores
Browse files Browse the repository at this point in the history
Don't offset the number of rayon workers by 1
  • Loading branch information
fitzgen committed Oct 2, 2019
2 parents 6d1dc81 + 53c0dcf commit 74812bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/raytrace-parallel/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Scene {
// Configure a rayon thread pool which will pull web workers from
// `pool`.
let thread_pool = rayon::ThreadPoolBuilder::new()
.num_threads(concurrency - 1)
.num_threads(concurrency)
.spawn_handler(|thread| Ok(pool.run(|| thread.run()).unwrap()))
.build()
.unwrap();
Expand Down

0 comments on commit 74812bd

Please sign in to comment.