Hyperlinkv0.8.0-beta.28

Latch

Latch.openUnsafeconsteffect/Latch.ts:251
(self: Latch): boolean

Opens the latch synchronously and releases fibers waiting on it.

When to use

Use when you need synchronous code to open a latch immediately and release the fibers waiting on it.

Details

Returns true when this call changed the latch from closed to open, or false if it was already open. This unsafe variant performs the state change immediately instead of returning an Effect.

Source effect/Latch.ts:2511 lines
export const openUnsafe = (self: Latch): boolean => self.openUnsafe()