zio.blocks.async.AsyncSelector
See theAsyncSelector companion object
final class AsyncSelector[A] extends Cancelable
A repeatable, round-robin selector for independently pending computations.
Eligibility means that a slot is armed (initially, or by replace) and its computation has completed. Among eligible slots selection scans cyclically from the slot after the previous winner. Consequently a continuously eligible slot wins within at most armedCount successful selections.
The selector registers one stable waker per armed slot, rather than a new loser waker per call to select. A winning slot is disarmed atomically and cannot win twice. shutdown is idempotent and does not finish until cleanup for every still-armed loser has finished.
Attributes
- Companion
- object
- Source
- AsyncSelector.scala
- Graph
-
- Supertypes
Members list
In this article