Trait zng_task::ParallelIteratorExt
source · 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.
Object Safety§
This trait is not object safe.