Improve asyncio.loop.call_soon() documentation (GH-20883)
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
(cherry picked from commit a16d6970496cae5ecab5aaea2b416a4b77527cc2)
Co-authored-by: Roger Iyengar <ri@rogeriyengar.com>
diff --git a/Doc/library/asyncio-dev.rst b/Doc/library/asyncio-dev.rst
index ff51c4f..77f8067 100644
--- a/Doc/library/asyncio-dev.rst
+++ b/Doc/library/asyncio-dev.rst
@@ -73,7 +73,7 @@
executes an ``await`` expression, the running Task gets suspended, and
the event loop executes the next Task.
-To schedule a callback from a different OS thread, the
+To schedule a :term:`callback` from another OS thread, the
:meth:`loop.call_soon_threadsafe` method should be used. Example::
loop.call_soon_threadsafe(callback, *args)