Hyperlinkv0.8.0-beta.28

PartitionedSemaphore

PartitionedSemaphore.capacityconsteffect/PartitionedSemaphore.ts:372
<K>(self: PartitionedSemaphore<K>): number

Gets the total capacity.

When to use

Use to inspect the fixed number of permits configured for the semaphore.

Details

Capacity is stored when the semaphore is created and does not change as permits are acquired or released.

gettersavailable
export const capacity = <K>(self: PartitionedSemaphore<K>): number => self.capacity