From eca2c02f8bb7a50611b3844fda97286590f263cc Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 14 Apr 2024 18:53:42 -0400 Subject: [PATCH] Flip to `.pause()` in subactor bp example --- examples/debugging/multi_subactors.py | 1 + examples/debugging/subactor_breakpoint.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/debugging/multi_subactors.py b/examples/debugging/multi_subactors.py index 259d526..22b13ac 100644 --- a/examples/debugging/multi_subactors.py +++ b/examples/debugging/multi_subactors.py @@ -38,6 +38,7 @@ async def main(): """ async with tractor.open_nursery( debug_mode=True, + # loglevel='runtime', ) as n: # Spawn both actors, don't bother with collecting results diff --git a/examples/debugging/subactor_breakpoint.py b/examples/debugging/subactor_breakpoint.py index bcc304d..4fdff48 100644 --- a/examples/debugging/subactor_breakpoint.py +++ b/examples/debugging/subactor_breakpoint.py @@ -3,17 +3,20 @@ import tractor async def breakpoint_forever(): - """Indefinitely re-enter debugger in child actor. - """ + ''' + Indefinitely re-enter debugger in child actor. + + ''' while True: await trio.sleep(0.1) - await tractor.breakpoint() + await tractor.pause() async def main(): async with tractor.open_nursery( debug_mode=True, + loglevel='cancel', ) as n: portal = await n.run_in_actor(