From bcbef1a095b0b2b8c87bfecc5b8c26f8d88b2cff Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 23 Jul 2020 13:34:03 -0400 Subject: [PATCH] WIP debugging test script --- debugging/mp_debug.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 debugging/mp_debug.py diff --git a/debugging/mp_debug.py b/debugging/mp_debug.py new file mode 100644 index 0000000..c43a810 --- /dev/null +++ b/debugging/mp_debug.py @@ -0,0 +1,28 @@ +import tractor +import trio + + +async def bubble(): + print('IN BUBBLE') + await trio.sleep(.1) + await tractor.breakpoint() + + +async def bail(): + getattr(doggy) + + +async def main(): + """The main ``tractor`` routine. + """ + async with tractor.open_nursery() as n: + + # portal = await n.run_in_actor('future_self', bubble) + portal = await n.run_in_actor('future_self', bail) + + # The ``async with`` will unblock here since the 'some_linguist' + # actor has completed its main task ``cellar_door``. + + +if __name__ == '__main__': + tractor.run(main, loglevel='info', debug_mode=True)