From 44b726c338392022943be48cbd86b4c1630917e9 Mon Sep 17 00:00:00 2001 From: Lonami Date: Tue, 19 Sep 2017 13:04:18 +0200 Subject: [PATCH] Insist to run short operations on the `ReadThread` --- Working-with-Updates.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Working-with-Updates.md b/Working-with-Updates.md index 4a4741b..9714b17 100644 --- a/Working-with-Updates.md +++ b/Working-with-Updates.md @@ -17,9 +17,9 @@ client.remove_update_handler(my_handler) # handlers = client.list_update_handlers() ``` -An update handler is nothing else than a method accepting a single parameter, the update object to be processed. +An update handler is nothing else than a method accepting a single parameter, the update object to be processed. Please **note** that you should only run **short-running operations** here! You won't be able to receive the result of invoking other requests, or even other updates, while an update handler is running. -Updates will be processed as long as there is at least one handler added, and adding the first handler will trigger a forced synchronization of the update state (manually called through `client.sync_updates()`) +Updates will be processed as long as there is at least one handler added, and adding the first handler will trigger a forced synchronization of the update state (manually called through `client.sync_updates()`). **You cannot invoke requests from within these handlers**. The handlers are called from a **read-only thread**, and attempting to invoke a request (hence sending it) will raise an `AssertionError`.