Module prelude

Module prelude 

Source

Structs§

AbortHandle
A handle to an Abortable task.
JoinHandle
An owned permission to join on a task (await its termination).

Functions§

abortable
Creates a new Abortable future and an AbortHandle which can be used to stop it.
sleep
Waits until duration has elapsed.
spawn
Spawns a new asynchronous task, returning a JoinHandle for it.
spawn_blocking
Runs the provided closure on a thread where blocking is acceptable.
spawn_local
Spawns a !Send future on the current LocalSet or LocalRuntime.
timeout_fut
Requires a Future to complete before the specified duration has elapsed.