[−][src]Struct scoped_pool::WaitGroup
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
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,