forked from goodboy/tractor
Drop legacy handler blocks factored into `_acquire_debug_lock()`
parent
e4006da6f4
commit
650313dfef
tractor
|
@ -288,8 +288,6 @@ async def _hijack_stdin_for_child(
|
||||||
with (
|
with (
|
||||||
trio.CancelScope(shield=True),
|
trio.CancelScope(shield=True),
|
||||||
):
|
):
|
||||||
# try:
|
|
||||||
# lock = None
|
|
||||||
async with _acquire_debug_lock(subactor_uid): # as lock:
|
async with _acquire_debug_lock(subactor_uid): # as lock:
|
||||||
|
|
||||||
# indicate to child that we've locked stdio
|
# 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:
|
async with ctx.open_stream() as stream:
|
||||||
assert await stream.receive() == 'pdb_unlock'
|
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"
|
return "pdb_unlock_complete"
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Reference in New Issue