Commit b10413f5 authored by Antoine Millet's avatar Antoine Millet

Fixed bugs with ReST notes.

parent 879f5c8f
......@@ -82,6 +82,7 @@ can disable this behavior with the `disable_fallback` parameter of the
a special rpc message "capabilities" is received.
.. note::
When the fallback mode is enabled, you can't use another protocols than the
default rpc. All calls to :meth:`RpcConnection.register_protocol`,
:meth:`RpcConnection.unregister_protocol`, :meth:`RpcConnection.create_rpc`
......
......@@ -9,11 +9,13 @@ class AsyncWatcher(object):
'''
Asynchronous call watcher -- Handle asynchronous calls and responses.
Usage example:
>>> watcher = AsyncWatcher()
>>> watcher.register(conn1, 'ping')
>>> watcher.register(conn2, 'ping')
>>> responses = watcher.wait() # Wait for all responses
Usage example::
>>> watcher = AsyncWatcher()
>>> watcher.register(conn1, 'ping')
>>> watcher.register(conn2, 'ping')
>>> responses = watcher.wait() # Wait for all responses
'''
def __init__(self):
......@@ -64,14 +66,15 @@ class AsyncWatcher(object):
:return: received messages in a list
.. note::
You can repeat call to this method on a single
:class:`AsyncWatcher`. For example, if you want to process the
first arrived message, then wait others for a minute, you can do:
first arrived message, then wait others for a minute, you can do::
>>> msgs = watcher.wait(max_wait=1)
>>> process_speedy(msgs[0])
>>> for msg in watcher.wait(timeout=60):
>>> process(msg)
>>> msgs = watcher.wait(max_wait=1)
>>> process_speedy(msgs[0])
>>> for msg in watcher.wait(timeout=60):
>>> process(msg)
'''
responses = []
while self.remains:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment