Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import asyncio
- async def doit():
- print('main')
- await asyncio.sleep(1)
- 1/0
- def main():
- loop = asyncio.get_event_loop()
- for _ in range(3):
- fut = loop.create_task(doit())
- try:
- loop.run_until_complete(fut)
- except ZeroDivisionError:
- print('again')
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement