forked from goodboy/tractor
1
0
Fork 0

Drop entrypoints from `Actor`

infect_asyncio_backup
Tyler Goodlet 2020-07-03 17:05:38 -04:00
parent e77f5dcdfa
commit f32d3e1464
1 changed files with 5 additions and 0 deletions

View File

@ -282,6 +282,9 @@ class Actor:
_parent_main_data: Dict[str, str] _parent_main_data: Dict[str, str]
_parent_chan_cs: Optional[trio.CancelScope] = None _parent_chan_cs: Optional[trio.CancelScope] = None
# if started on ``asycio`` running ``trio`` in guest mode
_infected_aio: bool = False
def __init__( def __init__(
self, self,
name: str, name: str,
@ -1185,6 +1188,8 @@ class Actor:
log.runtime(f"Handshake with actor {uid}@{chan.raddr} complete") log.runtime(f"Handshake with actor {uid}@{chan.raddr} complete")
return uid return uid
def is_infected_aio(self) -> bool:
return self._infected_aio
class Arbiter(Actor): class Arbiter(Actor):
"""A special actor who knows all the other actors and always has """A special actor who knows all the other actors and always has