Trait concurrency_traits::semaphore::Semaphore[][src]

pub unsafe trait Semaphore: TrySemaphore {
    fn wait(&self);
}
Expand description

A generic semaphore.

Safety

This trait is marked as unsafe to allow for safe code to rely on the standard semaphore contract. Default implementations should initialize the count at 0.

Required methods

fn wait(&self)[src]

Decrements the count if able or blocks until able.

Implementors

impl<C, CS> Semaphore for ParkSemaphore<C, CS> where
    C: Zero + One + AddAssign + SubAssign,
    CS: ThreadParker + ThreadFunctions
[src]

fn wait(&self)[src]