pub trait ParallelIteratorExt: ParallelIterator {
// Provided method
fn with_ctx(self) -> ParallelIteratorWithCtx<Self> { ... }
}
Expand description
Extends rayon’s ParallelIterator
with thread context.
Provided Methods§
Sourcefn with_ctx(self) -> ParallelIteratorWithCtx<Self>
fn with_ctx(self) -> ParallelIteratorWithCtx<Self>
Captures the current LocalContext
and propagates it to all rayon tasks
generated running this parallel iterator.
Without this adapter all closures in the iterator chain that use context_local!
and
app_local!
will probably not work correctly.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.