Skip to content

Commit 74812bd

Browse files
authored
Merge pull request #1802 from alexcrichton/switch-cores
Don't offset the number of rayon workers by 1
2 parents 6d1dc81 + 53c0dcf commit 74812bd

File tree

1 file changed

+1
-1
lines changed
  • examples/raytrace-parallel/src

1 file changed

+1
-1
lines changed

examples/raytrace-parallel/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl Scene {
6060
// Configure a rayon thread pool which will pull web workers from
6161
// `pool`.
6262
let thread_pool = rayon::ThreadPoolBuilder::new()
63-
.num_threads(concurrency - 1)
63+
.num_threads(concurrency)
6464
.spawn_handler(|thread| Ok(pool.run(|| thread.run()).unwrap()))
6565
.build()
6666
.unwrap();

0 commit comments

Comments
 (0)