Trait thread_pool::Task [] [src]

pub trait Task: Send + 'static {
    fn run(self);
}

A task that runs on a thread pool

A ThreadPool instance is pinned to run only a single type of task, represented by implementations of Task. However, it is sometimes useful to be able to schedule any arbitrary work to run on a thread pool. This can be done by using Box<TaskBox> as the task type.

Required Methods

Run the task

Implementors