tractor/examples/debugging/subactor_error.py

20 lines
300 B
Python
Raw Normal View History

2021-02-24 18:39:14 +00:00
import trio
2020-10-04 13:54:36 +00:00
import tractor
async def name_error():
getattr(doggypants)
async def main():
2021-02-24 18:39:14 +00:00
async with tractor.open_nursery(
debug_mode=True,
) as n:
2020-10-04 13:54:36 +00:00
portal = await n.run_in_actor(name_error)
2020-10-04 13:54:36 +00:00
await portal.result()
if __name__ == '__main__':
2021-02-24 18:39:14 +00:00
trio.run(main)