- The iterator will yield tweets forever and ever (until the stream
- breaks at which point it raises a TwitterHTTPError.)
-
- The `block` parameter controls if the stream is blocking. Default
- is blocking (True). When set to False, the iterator will
- occasionally yield None when there is no available message.
+ The iterator will yield until the TCP connection breaks. When the
+ connection breaks, the iterator yields `{'hangup': True}`, and
+ raises `StopIteration` if iterated again.
+
+ Similarly, if the stream does not produce heartbeats for more than
+ 90 seconds, the iterator yields `{'hangup': True,
+ 'heartbeat_timeout': True}`, and raises `StopIteration` if
+ iterated again.
+
+ The `timeout` parameter controls the maximum time between
+ yields. If it is nonzero, then the iterator will yield either
+ stream data or `{'timeout': True}` within the timeout period. This
+ is useful if you want your program to do other stuff in between
+ waiting for tweets.
+
+ The `block` parameter sets the stream to be fully non-blocking. In
+ this mode, the iterator always yields immediately. It returns
+ stream data, or `None`. Note that `timeout` supercedes this
+ argument, so it should also be set `None` to use this mode.