when

open fun when(state: T, task: Task): SelectTask<T>

Add a task to run when the state is equal to the given state.

Return

this task

Parameters

state

the state to run the task on

task

the task to run