Type Alias IncomingRequests

Source
pub type IncomingRequests<K> = NamedSemaphore<K>;
Expand description

A type alias for the list of tasks that are responding to requests

Aliased Type§

pub struct IncomingRequests<K> {
    inner: Arc<DashMap<K, Arc<()>>>,
    max_permits_per_key: usize,
    max_total_permits: Option<usize>,
    total_num_permits_held: Arc<Mutex<RawMutex, usize>>,
}

Fields§

§inner: Arc<DashMap<K, Arc<()>>>

The underlying map of keys to their semaphore

§max_permits_per_key: usize

The maximum number of permits for each key

§max_total_permits: Option<usize>

The maximum number of permits that can be held across all keys

§total_num_permits_held: Arc<Mutex<RawMutex, usize>>

The total number of permits that are currently being held