Package: effect
Module: Latch
Waits for the latch to be opened.
When to use
Use to suspend the current fiber until the latch is opened or the current set of waiters is released.
Details
Awaiting an already open latch completes immediately. Awaiting a closed
latch suspends until open or release resumes the waiters.
Gotchas
release can resume current waiters without opening the latch, so later
waiters may still suspend.
See
open for opening the latch for current and future waitersrelease for resuming current waiters without opening the latchwhenOpen for waiting before running another effectSignature
declare const await: (self: Latch) => Effect.Effect<void>
Since v4.0.0