mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-22 04:32:13 +00:00
Merge pull request #1802 from alexcrichton/switch-cores
Don't offset the number of rayon workers by 1
This commit is contained in:
commit
74812bd236
@ -60,7 +60,7 @@ impl Scene {
|
|||||||
// Configure a rayon thread pool which will pull web workers from
|
// Configure a rayon thread pool which will pull web workers from
|
||||||
// `pool`.
|
// `pool`.
|
||||||
let thread_pool = rayon::ThreadPoolBuilder::new()
|
let thread_pool = rayon::ThreadPoolBuilder::new()
|
||||||
.num_threads(concurrency - 1)
|
.num_threads(concurrency)
|
||||||
.spawn_handler(|thread| Ok(pool.run(|| thread.run()).unwrap()))
|
.spawn_handler(|thread| Ok(pool.run(|| thread.run()).unwrap()))
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user