Struct scoped_pool::WaitGroup
[−]
[src]
pub struct WaitGroup {
// some fields omitted
}A synchronization primitive for awaiting a set of actions.
Adding new jobs is done with submit, jobs are completed with complete,
and any thread may wait for all jobs to be completed with join.
Methods
impl WaitGroup[src]
fn new() -> Self
Create a new empty WaitGroup.
fn submit(&self)
Submit to this WaitGroup, causing join to wait
for an additional complete.
fn complete(&self)
Complete a previous submit.
fn poison(&self)
Poison the WaitGroup so all joining threads panic.
fn join(&self)
Wait for submits to this WaitGroup to be completed.
Submits occuring completely before joins will always be waited on.
Submits occuring concurrently with a join may or may not
be waited for.
Before submitting, join will always return immediately.