Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import asyncio
- async def do_io():
- print('io start')
- await asyncio.sleep(5)
- print('io end')
- async def do_other_things():
- print('doing other thigns')
- loop = asyncio.get_event_loop()
- loop.run_until_complete(do_io())
- loop.run_until_complete(do_other_things())
- loop.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement