Skip to main content

with_worker

Function with_worker 

Source
pub fn with_worker<T>(
    worker: usize,
    num_workers: usize,
    body: impl FnOnce() -> T,
) -> T
Expand description

Run body with this context presenting as worker worker of num_workers.

The identity is restored afterwards, so nesting works.