summaryrefslogtreecommitdiffstats
path: root/vendor/rayon-core/src/broadcast/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rayon-core/src/broadcast/mod.rs')
-rw-r--r--vendor/rayon-core/src/broadcast/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/rayon-core/src/broadcast/mod.rs b/vendor/rayon-core/src/broadcast/mod.rs
index 452aa71b6..d991c5461 100644
--- a/vendor/rayon-core/src/broadcast/mod.rs
+++ b/vendor/rayon-core/src/broadcast/mod.rs
@@ -1,4 +1,5 @@
use crate::job::{ArcJob, StackJob};
+use crate::latch::LatchRef;
use crate::registry::{Registry, WorkerThread};
use crate::scope::ScopeLatch;
use std::fmt;
@@ -107,7 +108,9 @@ where
let n_threads = registry.num_threads();
let current_thread = WorkerThread::current().as_ref();
let latch = ScopeLatch::with_count(n_threads, current_thread);
- let jobs: Vec<_> = (0..n_threads).map(|_| StackJob::new(&f, &latch)).collect();
+ let jobs: Vec<_> = (0..n_threads)
+ .map(|_| StackJob::new(&f, LatchRef::new(&latch)))
+ .collect();
let job_refs = jobs.iter().map(|job| job.as_job_ref());
registry.inject_broadcast(job_refs);