Function pyo3_asyncio::try_init[][src]

pub fn try_init(py: Python<'_>) -> PyResult<()>
👎 Deprecated since 0.14.0:

see the migration guide for more details

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.