Package: effect
Module: Latch
Closes the latch synchronously so future await and whenOpen calls
suspend.
When to use
Use to close a latch synchronously when the state change must happen outside
an Effect.
Details
Returns true when this call changed the latch from open to closed, or
false if it was already closed. This unsafe variant performs the state
change immediately instead of returning an Effect.
See
close for the effectful variantopenUnsafe to synchronously open the latch and release waiting
fibersSignature
declare const closeUnsafe: (self: Latch) => boolean
Since v4.0.0