Skip to main content

create_worker_pool

Function create_worker_pool 

Source
pub fn create_worker_pool<T, F, Fut>(
    concurrency: usize,
    worker_fn: F,
) -> (Sender<T>, TaskManager)
where T: Send + 'static, F: FnMut(T) -> Fut + Send + Clone + 'static, Fut: Future<Output = ()> + Send + 'static,
Expand description

Creates a set of worker tasks with a bounded channel for work distribution