Skip to main content

Module runtime

Module runtime 

Source
Expand description

Single-threaded async runtime that drives futures and I/O to completion.

The runtime polls all spawned tasks and the root future on every tick, then calls Io::poll to process I/O completions. Use block_on for one-shot execution or Runtime directly when you need access to the underlying I/O instance between runs.

Structs§

Runtime
Single-threaded async runtime owning an I/O backend and a set of spawned tasks.

Functions§

block_on
Convenience wrapper that creates a Runtime and runs fut to completion.