Struct executors::crossbeam_workstealing_pool::ThreadPool[][src]

pub struct ThreadPool { /* fields omitted */ }

Methods

impl ThreadPool
[src]

Creates a new thread pool capable of executing threads number of jobs concurrently.

Panics

This function will panic if threads is 0.

Examples

Create a new thread pool capable of executing four jobs concurrently:

use executors::*;
use executors::crossbeam_workstealing_pool::ThreadPool;

let pool = ThreadPool::new(4);

Trait Implementations

impl Clone for ThreadPool
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Executor for ThreadPool
[src]

Executes the function job on the Executor. Read more

Shutdown the Executor without waiting. Read more

Same as shutdown but without consuming self Read more

Shutdown an Executor and wait for it to shut down all workers. Read more

Auto Trait Implementations

impl Send for ThreadPool

impl Sync for ThreadPool