effect-io-ai

Package: effect
Module: Latch

Latch.closeUnsafe

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

Signature

declare const closeUnsafe: (self: Latch) => boolean

Source

Since v4.0.0