done, pending = asyncio.get_event_loop().run_until_complete(asyncio.wait([
sync(), sync()])) # terminated here
print(pending)
for task in done:
done.result() # it will not raise the exceptionTo get exceptions, I use asyncio.gather(*tasks) instead. asyncio.get_event_loop().run_until_complete(asyncio.gather(*[sync(), sync ()])) # it will raise exception
