effect-io-ai

Package: effect
Module: SynchronizedRef

SynchronizedRef.set

Sets the value of the SynchronizedRef, serialized by the ref’s semaphore.

When to use

Use to replace the current value of a SynchronizedRef with a known value while keeping the write serialized with other synchronized updates.

See

Signature

declare const set: { <A>(value: A): (self: SynchronizedRef<A>) => Effect.Effect<void>; <A>(self: SynchronizedRef<A>, value: A): Effect.Effect<void>; }

Source

Since v2.0.0