vector / com.haroldadmin.vector.state / StateProcessor / offerGetAction

offerGetAction

abstract fun offerGetAction(action: suspend (S) ->Unit):Unit

Offer a GetStateAction to this processor. The state parameter supplied to this action shall be the latest state value at the time of processing this action.

These actions are treated as side effects. When such an action is received, a separate coroutine is launched to process it. This means that when there are multiple such actions waiting in the queue, they will be launched in order, but their completion depends on how long it takes to process them. They will be processed in the coroutine context of their state processor.