(self: Latch): Effect.Effect<boolean>Releases the fibers currently waiting on a closed latch without opening it.
When to use
Use to let the fibers currently waiting on a latch proceed while keeping the latch closed for future waiters.
Details
The returned effect succeeds with true when release was requested while
the latch was closed, or false if the latch was already open. Future
waiters still suspend until the latch is opened or released again.
export const const release: (
self: Latch
) => Effect.Effect<boolean>
Releases the fibers currently waiting on a closed latch without opening it.
When to use
Use to let the fibers currently waiting on a latch proceed while keeping the
latch closed for future waiters.
Details
The returned effect succeeds with true when release was requested while
the latch was closed, or false if the latch was already open. Future
waiters still suspend until the latch is opened or released again.
release = (self: Latch(parameter) self: {
open: Effect.Effect<boolean>;
openUnsafe: (this: Latch) => boolean;
release: Effect.Effect<boolean>;
await: Effect.Effect<void>;
close: Effect.Effect<boolean>;
closeUnsafe: (this: Latch) => boolean;
whenOpen: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
isOpen: (this: Latch) => boolean;
}
self: Latch): import EffectEffect.type Effect.Effect = /*unresolved*/ anyEffect<boolean> => self: Latch(parameter) self: {
open: Effect.Effect<boolean>;
openUnsafe: (this: Latch) => boolean;
release: Effect.Effect<boolean>;
await: Effect.Effect<void>;
close: Effect.Effect<boolean>;
closeUnsafe: (this: Latch) => boolean;
whenOpen: <A, E, R>(self: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
isOpen: (this: Latch) => boolean;
}
self.Latch.release: Effect.Effect<boolean>(property) Latch.release: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
Releases all fibers currently waiting on the latch without opening it.
When to use
Use to let current waiters continue while future waiters still suspend.
release