pub struct WaitGroup {
pub total: Arc<AtomicU64>,
pub recv: Arc<Receiver<u64>>,
pub send: Arc<Sender<u64>>,
}Expand description
WaitGroup implementation using channel, supports both sync and async 使用 channel 实现的 WaitGroup,同时支持同步和异步
Fields§
§total: Arc<AtomicU64>§recv: Arc<Receiver<u64>>§send: Arc<Sender<u64>>Implementations§
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 UnwindSafe for WaitGroup
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)