From 650313dfef88b29e6870e26517dd083531d276fa Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 2 Aug 2022 12:50:06 -0400 Subject: [PATCH] Drop legacy handler blocks factored into `_acquire_debug_lock()` --- tractor/_debug.py | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/tractor/_debug.py b/tractor/_debug.py index bd794b0..0a6d1ba 100644 --- a/tractor/_debug.py +++ b/tractor/_debug.py @@ -288,8 +288,6 @@ async def _hijack_stdin_for_child( with ( trio.CancelScope(shield=True), ): - # try: - # lock = None async with _acquire_debug_lock(subactor_uid): # as lock: # indicate to child that we've locked stdio @@ -302,36 +300,6 @@ async def _hijack_stdin_for_child( async with ctx.open_stream() as stream: assert await stream.receive() == 'pdb_unlock' - # except ( - # BaseException, - # # trio.MultiError, - # # Exception, - # # trio.BrokenResourceError, - # # trio.Cancelled, # by local cancellation - # # trio.ClosedResourceError, # by self._rx_chan - # # ContextCancelled, - # # ConnectionResetError, - # ): - # # XXX: there may be a race with the portal teardown - # # with the calling actor which we can safely ignore. - # # The alternative would be sending an ack message - # # and allowing the client to wait for us to teardown - # # first? - # if lock and lock.locked(): - # try: - # lock.release() - # except RuntimeError: - # log.exception(f"we don't own the tty lock?") - - # # if isinstance(err, trio.Cancelled): - # raise - - # finally: - # log.runtime( - # "TTY lock released, remote task:" - # f"{task_name}:{subactor_uid}" - # ) - return "pdb_unlock_complete" finally: