AsyncQueue

Runs tasks asynchronously in an ordered manner. For each put call, return a Promise which resolves to the given delegate's return value. The taskFun is evaluated in a separate thread. Unlike threadAsync, at most one task will execute at any given time (per AsyncQueue instance), they will be executed in the order of the put calls, and the promises will be resolved in the main thread in the same order.

final
class AsyncQueue (
T
E = Exception
) {}

Constructors

this
this()
Undocumented in source.

Members

Functions

close
void close()

Close the queue. Must be called to free up resources (thread and message queue).

put
Promise!(T, E) put(T delegate() taskFun)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta