ae.utils.statequeue

ae.utils.statequeue

Members

Structs

LockingStateQueue
struct LockingStateQueue(State, bool strictlyOrdered = false)

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.

StateQueue
struct StateQueue(State)

Let f(x) be an expensive operation which changes something to (or towards) state x. At most one f call may be in progress at any time. This type orchestrates a series of operations that eventually bring the state to some goal, while allowing the goal to change at any time.

Meta

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Authors

Vladimir Panteleev <ae@cy.md>