Wrap sync into async Core technique: data = await asyncio.to_thread(perform_blocking_get, url) is the universal way to put any blocking function inside an async architecture. await asyncio.sleep(1) is used to wait inside aync function. Note that if ...
hash.hupili.net4 min read
No responses yet.