pub struct WaitGroup { /* private fields */ }Implementations§
Source§impl WaitGroup
impl WaitGroup
pub fn init() -> Self
pub fn init_with_count(count: usize) -> Self
pub fn add_unsynchronized(&mut self, n: usize)
pub fn add(&self, n: usize)
pub fn add_one(&self)
Sourcepub fn finish(&self)
pub fn finish(&self)
For a group kept alive past this call by something other than wait() returning (a
static, say); otherwise use finish_raw.
Sourcepub unsafe fn finish_raw(this: *const Self)
pub unsafe fn finish_raw(this: *const Self)
finish for a group the owner may free as soon as wait() returns:
the unlock’s releasing store is this thread’s last access to the group, which a
&self argument would instead assert until the call returned.
§Safety
this must be live with this task counted; once this lets wait() return, the
owner may free it.
pub fn wait(&self)
Trait Implementations§
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> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
RefPtr::init_ref ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing HasAutoFlush / RefCount ABI.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