Function pyo3_asyncio::generic::get_current_loop[][src]

pub fn get_current_loop<R>(py: Python<'_>) -> PyResult<&PyAny> where
    R: Runtime
Expand description

Get the current event loop from either Python or Rust async task local context

This function first checks if the runtime has a task-local reference to the Python event loop. If not, it calls get_running_loop to get the event loop associated with the current OS thread.