Dex.StateMachine.wait_for_state

### Method

# Dex StateMachinewait_for_state

unstable since: 1.2

#### Declaration [src]

    DexFuture*
    dex_state_machine_wait_for_state (
      DexStateMachine* state_machine,
      guint state
    )

#### Description [src]

Waits until `state_machine` enters `state`.

If `state_machine` 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 `dex_state_machine_transition()` to move the state machine.

Available since: 1.2

#### Parameters

`state`

  Type: `guint`

  The state to wait for.

#### Return value

Type: `DexFuture`

A future resolving to `state`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.