ShutdownContext
interface ShutdownContext<S : MVIState, I : MVIIntent, A : MVIAction> : ImmediateStateReceiver<S> , StoreLifecycle
The context in which the store may be shut down.
Provides a limited API to manipulate values that outlive the full PipelineContext.
Properties
Functions
Link copied to clipboard
Wait while the Store is started. If it is already started, returns immediately.
Link copied to clipboard
Suspend until the store is closed
Link copied to clipboard
Await while the Store is fully closed.
Link copied to clipboard
Directly compare and set the current state.
Link copied to clipboard
inline fun <T : S, S : MVIState> ImmediateStateReceiver<S>.updateStateImmediate(transform: T.() -> S)
A typed overload of updateStateImmediate.
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.