wait_for_state


Description:

[ Version ( since = "1.2" ) ]
public Future wait_for_state (uint state)

Waits until this enters state.

If this is already in state, the returned future is already resolved. Otherwise, the future resolves the next time the current state is set to state. This does not request a transition; use [ method@Dex.StateMachine.transition] to move the state machine.

Parameters:

this

a [class@Dex.StateMachine]

state

the state to wait for

Returns:

a future resolving to state