Hyperlinkv0.8.0-beta.28

Latch

Latch.closeconsteffect/Latch.ts:324
(self: Latch): Effect.Effect<boolean>

Closes the latch so future await and whenOpen calls suspend.

When to use

Use to re-enable waiting on a latch after it was opened, so later await and whenOpen calls suspend again.

Details

The returned effect succeeds with true when this call changed the latch from open to closed, or false if it was already closed.

combinatorscloseUnsafeopen
Source effect/Latch.ts:3241 lines
export const close = (self: Latch): Effect.Effect<boolean> => self.close