diff --git a/README.rst b/README.rst index 7614c83..2528f44 100644 --- a/README.rst +++ b/README.rst @@ -11,8 +11,8 @@ factory. The node is the unit of communication. Actor is built on top of Node to provide a distributed communication interface. When an actor joins the network it -announces itself to a announce service. The announce is stored in the remote -service and broadcast to all other nodes by a pub/sub queue. +announces itself to an announce service. The announce is stored in the remote +service and broadcasted to all other nodes by a pub/sub queue. Currently it supports Zeromq as the underlying protocol and JSON-RPC to encode and decode messages. diff --git a/synapse/node.py b/synapse/node.py index 15cac4e..7012fb6 100644 --- a/synapse/node.py +++ b/synapse/node.py @@ -42,9 +42,9 @@ ^ activates and calls its handler -.. note:: every function that may block MUST be protected by a event or another - data structure that will be wake up either directly by the poller or - indirectly by a chain of events. The poller is always the source that wakes +.. note:: every function that may block MUST be protected by an event or another + data structure that will be awoken either directly by the poller or + indirectly by a chain of events. The poller is always the source that wakes up the first event in the chain. """ @@ -614,7 +614,7 @@ def unregister(self, node): def poll(self): - """Warning blocks until a event happens on a monitored socket. Can + """Warning blocks until an event happens on a monitored socket. Can handle several events in a loop. """ @@ -715,7 +715,7 @@ def unregister(self, node): def poll(self): """ - Blocks until a event happens on a socket. Then gets all the events and + Blocks until an event happens on a socket. Then gets all the events and wakes all the corresponding nodes. Finally sleeps to let node greenlets run. If the poller has a *timeout* set, interrupt the polling after *timeout* seconds. When not specified, time values are represented in @@ -820,7 +820,7 @@ def recv(self): Return a message as a string from the receiving queue. Blocks on the underlying ``self._socket.recv()``, that's why it waits - on a event that will be woke up by the poller. + on an event that will be waked up by the poller. """ self._log.debug('waiting in recv()')