Package: effect
Module: SynchronizedRef
Runs an effectful modification atomically while holding the ref’s semaphore.
The effect computes a return value and an optional new ref value;
Option.some updates the ref and Option.none leaves it unchanged.
When to use
Use to effectfully compute a return value while optionally updating the
stored SynchronizedRef value.
See
modifySome for the pure variantupdateSomeEffect for effectful optional updates without a separate return valueSignature
declare const modifySomeEffect: { <A, B, R, E>(fallback: B, pf: (a: A) => Effect.Effect<readonly [B, Option.Option<A>], E, R>): (self: SynchronizedRef<A>) => Effect.Effect<B, E, R>; <A, B, R, E>(self: SynchronizedRef<A>, pf: (a: A) => Effect.Effect<readonly [B, Option.Option<A>], E, R>): Effect.Effect<B, E, R>; }
Since v2.0.0