Expand description
Tools for working with tasks.
This module contains:
Spawn, a trait for spawning new tasks.Context, a context of an asynchronous task, including a handle for waking up the task.Waker, a handle for waking up a task.
The remaining types and traits in the module are used for implementing executors or dealing with synchronization issues around task wakeup.
Structs§
- Atomic
Waker  - A synchronization primitive for task wakeup.
 - Context
 - The context of an asynchronous task.
 - Future
Obj  - A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + Send + 'a>. - Local
Future Obj  - A custom trait object for polling futures, roughly akin to
Box<dyn Future<Output = T> + 'a>. - RawWaker
 - A 
RawWakerallows the implementor of a task executor to create aWakeror aLocalWakerwhich provides customized wakeup behavior. - RawWakerV
Table  - A virtual function pointer table (vtable) that specifies the behavior
of a 
RawWaker. - Spawn
Error  - An error that occurred during spawning.
 - Waker
 - A 
Wakeris a handle for waking up a task by notifying its executor that it is ready to be run. 
Enums§
- Poll
 - Indicates whether a value is available or if the current task has been scheduled to receive a wakeup instead.
 
Traits§
- Local
Spawn  - The 
LocalSpawnis similar toSpawn, but allows spawning futures that don’t implementSend. - Local
Spawn Ext  - Extension trait for 
LocalSpawn. - Spawn
 - The 
Spawntrait allows for pushing futures onto an executor that will run them to completion. - Spawn
Ext  - Extension trait for 
Spawn. - Unsafe
Future Obj  - A custom implementation of a future trait object for 
FutureObj, providing a vtable with drop support. 
Functions§
- noop_
waker  - Create a new 
Wakerwhich does nothing whenwake()is called on it. - noop_
waker_ ref  - Get a static reference to a 
Wakerwhich does nothing whenwake()is called on it.