From e1b2bd20d0ef261680c9c974f2b22ffd708617c0 Mon Sep 17 00:00:00 2001 From: Andrew J Westlake Date: Mon, 25 Jan 2021 08:35:15 -0600 Subject: [PATCH] Added sleep in the initialization example as suggested --- guide/src/async-await.md | 1 + 1 file changed, 1 insertion(+) diff --git a/guide/src/async-await.md b/guide/src/async-await.md index 13ec85dd..23937e07 100644 --- a/guide/src/async-await.md +++ b/guide/src/async-await.md @@ -145,6 +145,7 @@ fn main() { // Run the Python event loop until the given future completes pyo3_asyncio::async_std::run_until_complete(py, async { // PyO3 is initialized - Ready to go + async_std::task::sleep(std::time::Duration::from_secs(1)).await; Ok(()) })?;