An asynchronous semaphore, which is a generalization of a mutex. Semaphores have a certain number of permits, which can be held and released concurrently by different parties. Attempts to acquire more permits than available result in the acquiring fiber being suspended until the specified number of permits become available.
- Companion:
- object
Value members
Concrete methods
Acquires a permit, executes the action and releases the permit right after.
Acquires a permit, executes the action and releases the permit right after.
Acquires a permit in a zio.ZManaged and releases the permit in the finalizer.
Acquires a permit in a zio.ZManaged and releases the permit in the finalizer.
Acquires n
permits, executes the action and releases the permits right
after.
Acquires n
permits, executes the action and releases the permits right
after.
Acquires n
permits in a zio.ZManaged and releases the permits in the
finalizer.
Acquires n
permits in a zio.ZManaged and releases the permits in the
finalizer.