Package: effect
Module: SynchronizedRef
Runs an effectful update while holding the ref’s semaphore, stores the new value if the effect succeeds, and returns that new value.
When to use
Use to run an effectful SynchronizedRef state transition and return the new
stored value.
See
updateEffect for effectful updates without returning the new valueupdateAndGet for the pure variantSignature
declare const updateAndGetEffect: { <A, R, E>(f: (a: A) => Effect.Effect<A, E, R>): (self: SynchronizedRef<A>) => Effect.Effect<A, E, R>; <A, R, E>(self: SynchronizedRef<A>, f: (a: A) => Effect.Effect<A, E, R>): Effect.Effect<A, E, R>; }
Since v2.0.0