Struct waitout::WaitGroup [] [src]

pub struct WaitGroup {
    // some fields omitted
}

A waitgroup waits for a collection of tasks to complete. It keeps track of tasks via shared counter

Methods

impl WaitGroup

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

Trait Implementations

impl Default for WaitGroup

fn default() -> WaitGroup