← effect
SynchronizedRef24
Mutations
getAndSetconstSets a new value atomically and returns the previous value, serialized by the ref's semaphore.getAndUpdateconstUpdates the current value atomically with a function and returns the previous value, serialized by the ref's semaphore.getAndUpdateEffectconstRuns an effectful update atomically while holding the ref's semaphore, sets the new value if the effect succeeds, and returns the previous value.getAndUpdateSomeconstApplies a partial update atomically and returns the previous value.getAndUpdateSomeEffectconstRuns an effectful partial update atomically while holding the ref's semaphore and returns the previous value.modifyconstComputes a return value and a new ref value atomically, stores the new value, and returns the computed result.modifyEffectconstRuns an effectful modification atomically while holding the ref's semaphore, stores the new value if the effect succeeds, and returns the computed result.modifySomeconstComputes a return value and an optional new ref value atomically.modifySomeEffectconstRuns an effectful modification atomically while holding the ref's semaphore.setconstSets the value of the SynchronizedRef, serialized by the ref's semaphore.setAndGetconstSets the value of the SynchronizedRef and returns the new value.updateconstUpdates the value of the SynchronizedRef with a function, serialized by the ref's semaphore.updateAndGetconstUpdates the value of the SynchronizedRef with a function and returns the new value.updateAndGetEffectconstRuns an effectful update while holding the ref's semaphore, stores the new value if the effect succeeds, and returns that new value.updateEffectconstRuns an effectful update while holding the ref's semaphore and stores the new value if the effect succeeds.updateSomeconstApplies a partial update to the current value.updateSomeAndGetconstApplies a partial update and returns the resulting current value.updateSomeAndGetEffectconstRuns an effectful partial update while holding the ref's semaphore and returns the resulting current value.updateSomeEffectconstRuns an effectful partial update while holding the ref's semaphore.