From 2ce8e0661957a3b7a26bf6f3b0b6e999151ed5fa Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 9 Nov 2018 01:40:12 -0500 Subject: [PATCH] Some minor doc/comment tweaks --- tractor/__init__.py | 2 +- tractor/_actor.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tractor/__init__.py b/tractor/__init__.py index 61b979c..ca2055f 100644 --- a/tractor/__init__.py +++ b/tractor/__init__.py @@ -104,7 +104,7 @@ def run_daemon( This is a convenience wrapper around ``tractor.run(trio.sleep(float('inf')))`` such that the first actor spawned - is meant to run forever handling to RPC requests. + is meant to run forever responding to RPC requests. """ kwargs['rpc_module_paths'] = rpc_module_paths diff --git a/tractor/_actor.py b/tractor/_actor.py index 2e08b12..8d686d5 100644 --- a/tractor/_actor.py +++ b/tractor/_actor.py @@ -218,6 +218,7 @@ class Actor: # - has to do with await main() in MainProcess) # if self.name == 'gretchen': # self._mods.pop('test_discovery') + # TODO: how to test the above? async def _stream_handler( self, @@ -399,8 +400,8 @@ class Actor: forkserver_info: Tuple[Any, Any, Any, Any, Any], parent_addr: Tuple[str, int] = None ) -> None: - # after fork routine which invokes a fresh ``trio.run`` - # log.warning("Log level after fork is {self.loglevel}") + """The routine called *after fork* which invokes a fresh ``trio.run`` + """ self._forkserver_info = forkserver_info from ._trionics import ctx if self.loglevel is not None: @@ -447,7 +448,7 @@ class Actor: if parent_addr is not None: try: # Connect back to the parent actor and conduct initial - # handshake (From this point on if we error ship the + # handshake (From this point on if we error, ship the # exception back to the parent actor) chan = self._parent_chan = Channel( destaddr=parent_addr, @@ -476,14 +477,13 @@ class Actor: task_status.started() log.debug("Waiting on root nursery to complete") - # blocks here as expected if no nursery was provided until - # the channel server is killed (i.e. this actor is - # cancelled or signalled by the parent actor) + + # blocks here as expected until the channel server is + # killed (i.e. this actor is cancelled or signalled by the parent) except Exception: if self._parent_chan: try: await self._parent_chan.send( - # {'error': traceback.format_exc(), 'cid': 'internal'}) {'error': traceback.format_exc()}) except trio.ClosedResourceError: log.error(