Encourage to use active polling

Lonami 2017-09-19 13:05:57 +02:00
parent 44b726c338
commit 7d07a715a2

@ -1,5 +1,7 @@
There are two ways in which you may want to use the library. Some people will simply want to show information about updates as they come, or invoke other requests as certain events happen, while other people don't care about processing updates at all. A mix between all of these is also possible. There are two ways in which you may want to use the library. Some people will simply want to show information about updates as they come, or invoke other requests as certain events happen, while other people don't care about processing updates at all. A mix between all of these is also possible.
If you're going to have the main thread idle (e.g. `while True: sleep(1)`), you should instead put it to good use as described on [Reacting to updates](#reacting-to-updates) instead just "listening" for updates.
## Listening for updates ## Listening for updates
By default, the library won't process updates at all (while it will still send periodic pings to ensure that the connection stays alive). If you want to listen for updates, simply add a new handler: By default, the library won't process updates at all (while it will still send periodic pings to ensure that the connection stays alive). If you want to listen for updates, simply add a new handler: