Skip to content

Instantly share code, notes, and snippets.

@Fuyukai
Created May 16, 2018 17:25
Show Gist options
  • Save Fuyukai/4d771da30b3c21a3f4a5ec31502771f5 to your computer and use it in GitHub Desktop.
Save Fuyukai/4d771da30b3c21a3f4a5ec31502771f5 to your computer and use it in GitHub Desktop.
import trio
async def one():
try:
1 / 0
except ZeroDivisionError:
await two()
async def two():
await one()
return 1 # never happens
async def main():
async with trio.open_nursery() as n:
n.start_soon(one)
trio.run(main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment