Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ Glossary
A list of bytecode instructions can be found in the documentation for
:ref:`the dis module <bytecodes>`.

callback
A subroutine function which is passed as an argument to be executed at
some point in the future.

class
A template for creating user-defined objects. Class definitions
normally contain method definitions which operate on instances of the
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/asyncio-dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ event loop, no other Tasks can run in the same thread. When a Task
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 a different OS thread, the
:meth:`loop.call_soon_threadsafe` method should be used. Example::

loop.call_soon_threadsafe(callback, *args)
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ Scheduling callbacks

.. method:: loop.call_soon(callback, *args, context=None)

Schedule a *callback* to be called with *args* arguments at
the next iteration of the event loop.
Schedule the *callback* :term:`callback` to be called with
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation for asyncio.create_task() says "Wrap the coro coroutine" instead of "Wrap a coro coroutine."

*args* arguments at the next iteration of the event loop.

Callbacks are called in the order in which they are registered.
Each callback will be called exactly once.
Expand Down