pub struct Semaphore { /* private fields */ }Expand description
Counting semaphore.
Implementations§
Source§impl Semaphore
impl Semaphore
Sourcepub fn new(initial: u32, max: u32) -> Result<Self>
pub fn new(initial: u32, max: u32) -> Result<Self>
Create a counting semaphore via heap allocation (only in heap mode).
Trait Implementations§
impl Send for Semaphore
impl Sync for Semaphore
Auto Trait Implementations§
impl Freeze for Semaphore
impl RefUnwindSafe for Semaphore
impl Unpin for Semaphore
impl UnwindSafe for Semaphore
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