updateStateImmediate

abstract fun updateStateImmediate(block: S.() -> S)

A function that obtains current state and updates it atomically (in the thread context), and non-atomically in the coroutine context, which means it can cause races when you want to update states in parallel.

This function is performant, but ignores ALL plugins and does not perform a serializable state transaction

It should only be used for the state updates that demand the highest performance and happen very often. If StoreConfiguration.atomicStateUpdates is false, then this function is the same as updateState

See also