effect-io-ai

Package: effect
Module: Latch

Latch.close

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.

See

Signature

declare const close: (self: Latch) => Effect.Effect<boolean>

Source

Since v4.0.0