Skip to main content

Module rt

Module rt 

Source
Expand description

Running async code from synchronous callers (CLI commands, the terminal UI, blocking-pool work): one shared runtime for the process, never one per call.

Functions§

block_on
Run f to completion from synchronous code. Inside a multi-threaded runtime the current thread hands its work over while it waits; elsewhere the shared runtime runs it.
shared
The process’s shared runtime, built on first use.