Trait workerpool::Worker
[−]
[src]
pub trait Worker: 'static {
type Input: Send;
type Output: Send;
fn new() -> Self;
fn execute(&mut self, _: Self::Input) -> Self::Output;
}Abstraction of a worker which executes tasks in its own thread.
Associated Types
Required Methods
Implementors
impl<T: Send + 'static> Worker for ThunkWorker<T> type Input = Thunk<'static, T>; type Output = T;