From d7a472c7f2d85139ec3169fcf76278f2c52dffb4 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 28 Sep 2020 13:13:53 -0400 Subject: [PATCH] Update our debugging example to wait on results --- debugging/mp_debug.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/debugging/mp_debug.py b/debugging/mp_debug.py index a279715..fff92d3 100644 --- a/debugging/mp_debug.py +++ b/debugging/mp_debug.py @@ -9,7 +9,7 @@ async def bubble(): await tractor.breakpoint() -async def bail(): +async def name_error(): getattr(doggy) @@ -19,13 +19,21 @@ async def main(): async with tractor.open_nursery() as n: portal1 = await n.run_in_actor('bubble', bubble) - portal = await n.run_in_actor('bail', bail) - # await portal.result() - # await portal1.result() + portal = await n.run_in_actor('name_error', name_error) + await portal1.result() + await portal.result() # The ``async with`` will unblock here since the 'some_linguist' # actor has completed its main task ``cellar_door``. +# TODO: +# - recurrent entry from single actor +# - recurrent entry to breakpoint() from single actor *after* and an +# error +# - root error alongside child errors +# - recurrent root errors + + if __name__ == '__main__': - tractor.run(main, loglevel='error', debug_mode=True) + tractor.run(main, loglevel='info', debug_mode=True)