AsyncSemaphoreUtils class
Semaphore: at most permits concurrent acquisitions.
Constructors
- AsyncSemaphoreUtils(int permits)
-
Creates a semaphore allowing at most
permitsconcurrent acquisitions. Audited: 2026-06-12 11:26 EDT
Properties
Methods
-
acquire(
) → Future< void> - Waits for a permit, then acquires it. Completes immediately when a permit is free, otherwise queues until release hands one over. Audited: 2026-06-12 11:26 EDT
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
) → void - Releases one permit; hands it directly to the next waiter if any, otherwise returns it to the available pool. Audited: 2026-06-12 11:26 EDT
-
run<
T> (AsyncAction< T> fn) → Future<T> -
Acquires a permit, runs
fn, then releases; ensures release on exception. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited