Add `Channel.closed/.cancel_called`
I.e. the public properties for the private instance var equivs; improves expected introspection usage.multicast_revertable_streams
parent
c51a49b045
commit
2a69d179e6
|
@ -101,11 +101,27 @@ class Channel:
|
||||||
# ^XXX! ONLY set if a remote actor sends an `Error`-msg
|
# ^XXX! ONLY set if a remote actor sends an `Error`-msg
|
||||||
self._closed: bool = False
|
self._closed: bool = False
|
||||||
|
|
||||||
# flag set by ``Portal.cancel_actor()`` indicating remote
|
# flag set by `Portal.cancel_actor()` indicating remote
|
||||||
# (possibly peer) cancellation of the far end actor
|
# (possibly peer) cancellation of the far end actor runtime.
|
||||||
# runtime.
|
|
||||||
self._cancel_called: bool = False
|
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
|
@property
|
||||||
def uid(self) -> tuple[str, str]:
|
def uid(self) -> tuple[str, str]:
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in New Issue