From 083b73ad4a15f86b1bc1966e417890db9e24c83f Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 25 Oct 2021 10:22:41 -0400 Subject: [PATCH] Test: don't grab debug lock if not in mode --- tractor/_debug.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tractor/_debug.py b/tractor/_debug.py index 67485af..7aac4eb 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -558,6 +558,9 @@ async def acquire_debug_lock( Grab root's debug lock on entry, release on exit. ''' + if not debug_mode(): + return + async with trio.open_nursery() as n: cs = await n.start( wait_for_parent_stdin_hijack,