Semaphore

Type Alias Semaphore 

Source
pub type Semaphore = GenericSemaphore<RawMutex>;
Expand description

An async-aware semaphore for constraining the number of concurrent blocking operations.

This re-exported type is either futures_intrusive::sync::Semaphore (futures-intrusive feature) or tokio::sync::Semaphore (tokio-semaphore or tokio-omnibus features).


A GenericSemaphore backed by parking_lot.

Aliased Type§

pub struct Semaphore { /* private fields */ }

Trait Implementations§

Source§

impl Semaphorish for Semaphore

Source§

fn default_new(permits: usize) -> Self

Construct given number of permits. Read more