Module runtime

Source
Expand description

Runtime compatibility layer

Modules§

fs
Asynchronous file utilities.
io
Traits, helpers, and type definitions for asynchronous I/O functionality.
net
TCP/UDP/Unix bindings for tokio.
process
An implementation of asynchronous process management for Tokio.
runtime
The Tokio runtime.
signal
Asynchronous signal handling for Tokio.
stream
Due to the Stream trait’s inclusion in std landing later than Tokio’s 1.0 release, most of the Tokio stream utilities have been moved into the tokio-stream crate.
sync
Synchronization primitives for use in asynchronous contexts.
task
Asynchronous green-threads.
time
Utilities for tracking time.

Macros§

join
Waits on multiple concurrent branches, returning when all branches complete.
pin
Pins a value on the stack.
select
Waits on multiple concurrent branches, returning when the first branch completes, cancelling the remaining branches.
task_local
Declares a new task-local key of type tokio::task::LocalKey.
try_join
Waits on multiple concurrent branches, returning when all branches complete with Ok(_) or on the first Err(_).

Functions§

spawn
Spawns a new asynchronous task, returning a JoinHandle for it.

Type Aliases§

Handle
Runtime

Attribute Macros§

main
Marks async function to be executed by the selected runtime. This macro helps set up a Runtime without requiring the user to use Runtime or Builder directly.
test
Marks async function to be executed by runtime, suitable to test environment. This macro helps set up a Runtime without requiring the user to use Runtime or Builder directly.