[][src]Struct scoped_pool::WaitGroup

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.

Methods

impl WaitGroup[src]

pub fn new() -> Self[src]

Create a new empty WaitGroup.

pub fn waiting(&self) -> usize[src]

How many submitted tasks are waiting for completion.

pub fn submit(&self)[src]

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

pub fn complete(&self)[src]

Complete a previous submit.

pub fn poison(&self)[src]

Poison the WaitGroup so all joining threads panic.

pub fn join(&self)[src]

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[src]

Auto Trait Implementations

impl Send for WaitGroup

impl Sync for WaitGroup

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.