Struct forkjoin::ForkPool [] [src]

pub struct ForkPool<'a, Arg: Send, Ret: Send + Sync> {
    // some fields omitted
}

Main struct of the ForkJoin library. Represents a pool of threads implementing a work stealing algorithm.

Methods

impl<'a, Arg: Send + 'a, Ret: Send + Sync + 'a> ForkPool<'a, Arg, Ret>

fn new() -> ForkPool<'a, Arg, Ret>

Create a new ForkPool using num_cpus to determine pool size

fn with_threads(nthreads: usize) -> ForkPool<'a, Arg, Ret>

Create a new ForkPool with nthreads WorkerThreads at its disposal.

fn init_algorithm(&self, algorithm: Algorithm<Arg, Ret>) -> AlgoOnPool<Arg, Ret>

Apply a specified algorithm to this ForkPool and get a handle for it where jobs can be scheduled.

Trait Implementations

impl<'a, Arg: Send, Ret: Send + Sync> Drop for ForkPool<'a, Arg, Ret>

fn drop(&mut self)