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§
Sourcetype Semaphore: DistributedSemaphore
type Semaphore: DistributedSemaphore
The semaphore type created by this provider.
Required Methods§
Sourcefn create_semaphore(&self, name: &str, max_count: u32) -> Self::Semaphore
fn create_semaphore(&self, name: &str, max_count: u32) -> Self::Semaphore
Creates a semaphore with the given name and max count.