diff --git a/tractor/ipc/_chan.py b/tractor/ipc/_chan.py index 64643d95..9ddab8b0 100644 --- a/tractor/ipc/_chan.py +++ b/tractor/ipc/_chan.py @@ -101,11 +101,27 @@ class Channel: # ^XXX! ONLY set if a remote actor sends an `Error`-msg self._closed: bool = False - # flag set by ``Portal.cancel_actor()`` indicating remote - # (possibly peer) cancellation of the far end actor - # runtime. + # flag set by `Portal.cancel_actor()` indicating remote + # (possibly peer) cancellation of the far end actor runtime. self._cancel_called: bool = False + @property + def closed(self) -> bool: + ''' + Was `.aclose()` successfully called? + + ''' + return self._closed + + @property + def cancel_called(self) -> bool: + ''' + Set when `Portal.cancel_actor()` is called on a portal which + wraps this IPC channel. + + ''' + return self._cancel_called + @property def uid(self) -> tuple[str, str]: '''