pub struct WaitGroup { /* private fields */ }Expand description
A synchronization primitive for waiting on multiple tasks to complete.
See the module level documentation for more.
Implementations§
Trait Implementations§
Source§impl Clone for WaitGroup
impl Clone for WaitGroup
Source§fn clone(&self) -> Self
fn clone(&self) -> Self
Creates a new worker handle for the WaitGroup.
This increments the WaitGroup counter. The counter will be decremented when the new handle is dropped.
§Panics
Panics if the WaitGroup counter would overflow.
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl IntoFuture for WaitGroup
impl IntoFuture for WaitGroup
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Converts the WaitGroup into a future that completes when all tasks finish. This decreases the WaitGroup counter.
Source§type IntoFuture = Wait
type IntoFuture = Wait
Which kind of future are we turning this into?
Auto Trait Implementations§
impl Freeze for WaitGroup
impl RefUnwindSafe for WaitGroup
impl Send for WaitGroup
impl Sync for WaitGroup
impl Unpin for WaitGroup
impl UnsafeUnpin for WaitGroup
impl UnwindSafe for WaitGroup
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more