Struct scope_threadpool::Pool
[−]
[src]
pub struct Pool { /* fields omitted */ }Holds a number of threads that you can run tasks on
Methods
impl Pool[src]
fn new(nthreads: usize) -> Pool[src]
Spawn a number of threads each of which call a state making function.
fn new_with_backlog(nthreads: usize, backlog: usize) -> Pool[src]
Spawn a number of threads. The pool's queue of pending jobs is limited.
backlog is the number of jobs that haven't been run.
If specified, Scope::execute will block
until a job completes.
fn scoped<F>(&mut self, f: F) where
F: FnOnce(Scope), [src]
F: FnOnce(Scope),
Store the current scope so that you can run jobs in it.
This function panics if the given closure or any threads panic.
Does not return until all executed jobs complete.