Package: effect
Module: SynchronizedRef
Runs an effectful update while holding the ref’s semaphore and stores the new value if the effect succeeds.
When to use
Use to run an effectful state transition on a SynchronizedRef when storing
the new value is the only result you need.
See
update for a pure state transitiongetAndUpdateEffect for returning the previous stored valueupdateAndGetEffect for returning the new stored valuemodifyEffect for returning a separate result while storing a new valueupdateSomeEffect for effectfully applying only some state transitionsSignature
declare const updateEffect: { <A, R, E>(f: (a: A) => Effect.Effect<A, E, R>): (self: SynchronizedRef<A>) => Effect.Effect<void, E, R>; <A, R, E>(self: SynchronizedRef<A>, f: (a: A) => Effect.Effect<A, E, R>): Effect.Effect<void, E, R>; }
Since v2.0.0