2021-12-10 17:48:05 +00:00
|
|
|
import trio
|
|
|
|
import tractor
|
|
|
|
|
|
|
|
async def die():
|
|
|
|
raise RuntimeError
|
|
|
|
|
|
|
|
|
|
|
|
async def main():
|
|
|
|
async with tractor.open_nursery() as tn:
|
|
|
|
|
|
|
|
debug_actor = await tn.start_actor(
|
|
|
|
'debugged_boi',
|
|
|
|
enable_modules=[__name__],
|
|
|
|
debug_mode=True,
|
|
|
|
)
|
|
|
|
crash_boi = await tn.start_actor(
|
|
|
|
'crash_boi',
|
|
|
|
enable_modules=[__name__],
|
|
|
|
# debug_mode=True,
|
|
|
|
)
|
|
|
|
|
|
|
|
async with trio.open_nursery() as n:
|
|
|
|
n.start_soon(debug_actor.run, die)
|
|
|
|
n.start_soon(crash_boi.run, die)
|
|
|
|
|
2024-05-28 13:22:59 +00:00
|
|
|
|
2021-12-10 17:48:05 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
trio.run(main)
|