Add `Portal.chan` property, to wrap `._chan` attr

multihost_exs
Tyler Goodlet 2024-07-02 15:53:33 -04:00
parent af3745684c
commit 3c5816c977
1 changed files with 5 additions and 1 deletions

View File

@ -97,7 +97,7 @@ class Portal:
channel: Channel, channel: Channel,
) -> None: ) -> None:
self.chan = channel self._chan: Channel = channel
# during the portal's lifetime # during the portal's lifetime
self._final_result_pld: Any|None = None self._final_result_pld: Any|None = None
self._final_result_msg: PayloadMsg|None = None self._final_result_msg: PayloadMsg|None = None
@ -109,6 +109,10 @@ class Portal:
self._streams: set[MsgStream] = set() self._streams: set[MsgStream] = set()
self.actor: Actor = current_actor() self.actor: Actor = current_actor()
@property
def chan(self) -> Channel:
return self._chan
@property @property
def channel(self) -> Channel: def channel(self) -> Channel:
''' '''