aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-04-17 15:10:40 +0200
committerLorenz Diener <[email protected]>2018-04-17 15:10:40 +0200
commit400faadc0deeb352d78291857cd6a2c8b8c528d3 (patch)
treecb212cb73a5962422a20ce26096d568dedb0050f
parenteb336a30c2ef04c2b0f66727de1bc585ad96e2da (diff)
downloadmastodon.py-400faadc0deeb352d78291857cd6a2c8b8c528d3.tar.gz
Document new async behaviour a bit
-rw-r--r--docs/index.rst16
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 5a1254d..f463156 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -725,13 +725,17 @@ Streaming
725--------- 725---------
726These functions allow access to the streaming API. 726These functions allow access to the streaming API.
727 727
728If async is False, these methods block forever (or until an 728If `async` is False, these methods block forever (or until an exception is raised).
729exception is raised).
730 729
731If async is True, the listener will listen on another thread and these methods 730If `async` is True, the listener will listen on another thread and these methods
732will return a handle corresponding to the open connection. The 731will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True,
733connection may be closed at any time by calling the handles close() method, and the 732the thread will attempt to reconnect to the streaming API if any errors are encountered, waiting
734status of the connection can be verified calling is_alive() on the handle. 733`async_reconnect_wait_sec` seconds between reconnection attempts. Note that no effort is made
734to "catch up" - toots made while the connection is broken will not be received.
735
736The connection may be closed at any time by calling the handles close() method. The
737current status of the handler thread can be checked with the handles is_alive() function,
738and the streaming status can be checked by calling is_receiving().
735 739
736The streaming functions take instances of `StreamListener` as the `listener` parameter. 740The streaming functions take instances of `StreamListener` as the `listener` parameter.
737A `CallbackStreamListener` class that allows you to specify function callbacks 741A `CallbackStreamListener` class that allows you to specify function callbacks
Powered by cgit v1.2.3 (git 2.41.0)