[−][src]Module futures::task
Tools for working with tasks.
This module contains:
Context, which provides contextual data present for every task, including a handle for waking up the task.Waker, a handle for waking up a task.
Tasks themselves are generally created by spawning a future onto an
executor. However, you can manually construct a task
by creating your own Context instance, and polling a future with it.
The remaining types and traits in the module are used for implementing executors or dealing with synchronization issues around task wakeup.
Structs
| AtomicWaker |
A synchronization primitive for task wakeup. |
| Context |
[ Experimental ] Information about the currently-running task. |
| JoinHandle |
The join handle returned by
|
| LocalWaker |
[ Experimental ] A |
| LocalWakerRef |
A |
| SpawnError |
The result of a failed spawn |
| SpawnErrorKind |
[ Experimental ] Provides the reason that an executor was unable to spawn. |
| SpawnLocalObjError |
[ Experimental ] The result of a failed spawn |
| SpawnObjError |
[ Experimental ] The result of a failed spawn |
| Waker |
[ Experimental ] A |
Enums
| Poll |
[ Experimental ] Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead. |
Traits
| Spawn |
[ Experimental ] Spawns tasks that poll futures to completion onto its associated task executor. |
| SpawnExt |
Extension trait for |
| UnsafeWake |
[ Experimental ] An unsafe trait for implementing custom memory management for a |
| Wake |
[ Experimental ] A way of waking up a specific task. |
Functions
| local_waker⚠ |
[ Experimental ] Creates a |
| local_waker_from_nonlocal |
[ Experimental ] Creates a |
| local_waker_ref⚠ |
Creates a reference to a |
| local_waker_ref_from_nonlocal |
Creates a reference to a |