SemaphoreProvider

Trait SemaphoreProvider 

Source
pub trait SemaphoreProvider: Send + Sync {
    type Semaphore: DistributedSemaphore;

    // Required method
    fn create_semaphore(&self, name: &str, max_count: u32) -> Self::Semaphore;
}
Expand description

Factory for creating semaphores by name.

Required Associated Types§

Source

type Semaphore: DistributedSemaphore

The semaphore type created by this provider.

Required Methods§

Source

fn create_semaphore(&self, name: &str, max_count: u32) -> Self::Semaphore

Creates a semaphore with the given name and max count.

Implementors§