Function pyo3_asyncio::try_init[][src]

pub fn try_init(py: Python<'_>) -> PyResult<()>
Expand description

Attempt to initialize the Python and Rust event loops

  • Must be called before any other pyo3-asyncio functions.
  • Calling try_init a second time returns Ok(()) and does nothing.

    In future versions this may return an Err.