Struct waitout::WaitGroup
[−]
[src]
pub struct WaitGroup { /* fields omitted */ }
A waitgroup waits for a collection of tasks to complete. It keeps track of tasks via shared counter
Methods
impl WaitGroup
[src]
fn new(n: usize) -> WaitGroup
creates a new wait group instance
fn add(&self, delta: usize)
adds delta
to internal counter
fn done(&self)
subtracts 1 from internal counter
fn wait(&self)
blocks the current thread until wait group is complete