Added sleep in the initialization example as suggested

This commit is contained in:
Andrew J Westlake 2021-01-25 08:35:15 -06:00 committed by David Hewitt
parent bc87c57f7c
commit e1b2bd20d0
1 changed files with 1 additions and 0 deletions

View File

@ -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(())
})?;