Module tasks

Module tasks 

Source
Expand description

Contains the task runner and utilities for running async.

Modules§

fetcher
Contains the fetcher::Fetcher structure.
runner
Contains the TaskRunner and related structures.
task
Contains the Task and task::LocalTask traits.
waker
Contains a dummy implementation of a waker. Used in Task::take.

Functions§

block_on
Blocks the current thread on the global task runner until the future is ready.
init
Initializes the global task runner.
runner
Get the global task runner.
spawn
Spawns a task on the global task runner.
spawn_blocking
Spawns a blocking task on the global task runner.
try_init
Tries to initialize the task runner, if it isn’t yet.
try_runner
Try to get the global task runner. Returns None if the task runner is not initialized.