Sequential Actor
class SequentialActor<Context, S>(initial: S, scope: CoroutineScope = CoroutineScope(Dispatchers.IO)) : StateActor<Context, S> (source)
A StateActor that serializes all action execution via a FIFO Channel.
Actions dispatched with effect or immediate execute in dispatch order and never run concurrently — matching the behavior of a single-threaded queue dispatcher.
Re-entrant: actions that call immediate on the same actor execute inline (they're already inside the consumer loop).
Functions
Link copied to clipboard
open suspend override fun <Ctx> immediateUntil(ctx: Ctx, action: TypedAction<Ctx>, until: (S) -> Boolean): S
Dispatch action and suspend until state matches until.
Link copied to clipboard
Add an async interceptor that wraps the action's suspend execution. Runs inside the coroutine — next() suspends until the action completes.