From e991f44455a684c18f4194236422a546c981c9a7 Mon Sep 17 00:00:00 2001 From: Harshil <37377066+harshil21@users.noreply.github.com> Date: Wed, 27 Apr 2022 02:21:59 +0530 Subject: [PATCH] fix spelling and add link --- Concurrency.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Concurrency.md b/Concurrency.md index 7af0242..9db9d34 100644 --- a/Concurrency.md +++ b/Concurrency.md @@ -97,7 +97,7 @@ Now the `Application` will start `Application.process_update(Update A)` via `asy Again, pseudocode: ```python -while not application.update_queue.empy(): +while not application.update_queue.empty(): update = await application.update_queue.get() asyncio.create_task(application.process_update(update)) ``` @@ -110,7 +110,7 @@ This is a simple measure to avoid e.g. DDOS attacks `Handler.block` and `Application.concurrent_updates` allow running handler callbacks or the entirety of handling an update concurrently. In addition to that, PTB offers `Application.create_task` to run specific coroutine function concurrently. `Application.create_task` is a very thin wrapper around [`asyncio.create_task`](https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task) that adds some book-keeping that comes in handy for using it in PTB. -Please consult the documentation of `Application.create_task` for more details. +Please consult the documentation of [`Application.create_task`](https://python-telegram-bot.readthedocs.io/en/latest/telegram.ext.application.html#telegram.ext.Application.create_task) for more details. This wrapper gives you fine-grained control about how you use concurrency in PTB. The next section gives you in idea about why that is helpful.