Struct scoped_pool::WaitGroup [] [src]

pub struct WaitGroup { /* 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.


impl WaitGroup

Create a new empty WaitGroup.

How many submitted tasks are waiting for completion.

Submit to this WaitGroup, causing join to wait for an additional complete.

Complete a previous submit.

Poison the WaitGroup so all joining threads panic.

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.

Trait Implementations

impl Default for WaitGroup

Returns the "default value" for a type. Read more