From 14f84571fbf6c7f78ed76518dd72935c20ae3892 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 2 Dec 2021 12:42:29 -0500 Subject: [PATCH] Don't cancel receive streams inside `.cancel_actor()` We don't need to any more presuming you get ideal remote cancellation conditions where the remote actor should teardown and kill the streams from its end. --- tractor/_portal.py | 2 -- tractor/_spawn.py | 1 - 2 files changed, 3 deletions(-) diff --git a/tractor/_portal.py b/tractor/_portal.py index d32f26b..c3a4340 100644 --- a/tractor/_portal.py +++ b/tractor/_portal.py @@ -218,8 +218,6 @@ class Portal: log.cancel("This portal is already closed can't cancel") return False - await self._cancel_streams() - log.cancel( f"Sending actor cancel request to {self.channel.uid} on " f"{self.channel}") diff --git a/tractor/_spawn.py b/tractor/_spawn.py index 04c1008..c7eb2d2 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -203,7 +203,6 @@ async def soft_wait( # which will kill any waiting remote pdb trace). # This is a "soft" (cancellable) join/reap. try: - # await proc.wait() await wait_func(proc) except trio.Cancelled: # if cancelled during a soft wait, cancel the child