Expand description
tokio-runtime
PyO3 Asyncio functions specific to the tokio runtime
Items marked with <span class=“module-item stab portability” style=“display: inline; border-radius: 3px; padding: 2px; font-size: 80%; line-height: 1.2;”
unstable-streams
are only available when theunstable-streams
Cargo feature is enabled:
[dependencies.pyo3-async-runtimes]
version = "0.24"
features = ["unstable-streams"]
Modules§
- re_
exports attributes
re-exports for macros
Functions§
- future_
into_ py - Convert a Rust Future into a Python awaitable
- future_
into_ py_ with_ locals - Convert a Rust Future into a Python awaitable
- get_
current_ locals - Either copy the task locals from the current task OR get the current running loop and contextvars from Python.
- get_
current_ loop - Get the current event loop from either Python or Rust async task local context
- get_
runtime - Get a reference to the current tokio runtime
- init
- Initialize the Tokio runtime with a custom build
- init_
with_ runtime - Initialize the Tokio runtime with a custom Tokio runtime
- into_
future - Convert a Python
awaitable
into a Rust Future - local_
future_ into_ py Deprecated - Convert a
!Send
Rust Future into a Python awaitable - local_
future_ into_ py_ with_ locals Deprecated - Convert a
!Send
Rust Future into a Python awaitable - run
- Run the event loop until the given Future completes
- run_
until_ complete - Run the event loop until the given Future completes
- scope
- Set the task local event loop for the given future
- scope_
local - Set the task local event loop for the given !Send future