LockingStateQueue

A wrapper around a StateQueue which modifies its behavior, such that: 1. After a transition to a state completes, a temporary "lock" is obtained, which blocks any transitions while it is held; 2. Transition requests form a queue of arbitrary length.

Constructors

this
this(Promise!State delegate(State) stateFunc, State initialState)

Constructor.

Members

Functions

addGoal
Promise!Lock addGoal(State state)

Enqueue a desired goal state.

release
void release(Lock lock)

Relinquish the lock, allowing a transition to a different state.

Properties

goalState
State goalState [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
newState
State newState [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
oldState
State oldState [@property getter]

These may be useful to access in stateFunc.

Structs

Lock
struct Lock

Represents a held lock. The lock is acquired automatically when a desired state is reached. To release the lock, call .release on the queue object.

Meta