Trait dpc_pariter::ThreadPool [−][src]
pub trait ThreadPool {
type JoinHandle;
fn submit<F>(&mut self, f: F) -> Self::JoinHandle
where
F: FnOnce() + Send + 'static;
}
Expand description
An interface for any thread pool to be used with parallel iterator
Associated Types
type JoinHandle
type JoinHandle
A thread-handle
ParallelMap and other iterators will hold on to it, until they drop
Required methods
fn submit<F>(&mut self, f: F) -> Self::JoinHandle where
F: FnOnce() + Send + 'static,
fn submit<F>(&mut self, f: F) -> Self::JoinHandle where
F: FnOnce() + Send + 'static,
Submit a function to the thread pool