Skip to main content

ParallelIteratorExt

Trait ParallelIteratorExt 

Source
pub trait ParallelIteratorExt: ParallelIterator {
    // Required methods
    fn with_threads(self, numthreads: usize) -> Self;
    fn with_thread_init<F>(self, init: F) -> Self
       where F: Fn() + Send + Sync + 'static;
}
Expand description

Parallel iterator with thread pool integration

Required Methods§

Source

fn with_threads(self, numthreads: usize) -> Self

Configure the number of threads for this operation

Source

fn with_thread_init<F>(self, init: F) -> Self
where F: Fn() + Send + Sync + 'static,

Configure thread-local initialization

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§