Module asynchronous.tasks
Support for tasks, coroutines and the scheduler.
Functions
Name | Description |
---|---|
asCompleted
|
Return a generator whose values, when waited for, are Future instances in the order they complete. |
ensureFuture
|
Schedule the execution of a coroutine : wrap it in a future. Return a
Task object.
|
shield
|
Wait for a future, shielding it from cancellation. |
sleep
|
Create a coroutine that completes after a given time. If result
is provided, it is produced to the caller when the coroutine completes.
|
wait
|
Wait for the Future instances given by futures to complete.
|
waitFor
|
Wait for the single Future to complete with timeout . If timeout is 0 or
negative, block until the future completes.
|
yieldValue
|
Yield a value to the caller of the currently executing generator task. The
type of the yielded value and the type of the generator must be the same.
|
Classes
Name | Description |
---|---|
GeneratorTask
|
A GeneratorTask is a Task that periodically returns
values of type T to the caller via yieldValue . This
is represented as an InputRange.
|
Task
|
Schedule the execution of a fiber: wrap it in a future. A task is a subclass of Future. |
Authors
Dragos Carp
Copyright
© 2015-2016 Dragos Carp
License
Boost Software License - Version 1.0