Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
reword
  • Loading branch information
anordin95 committed Sep 3, 2025
commit 5caa155f58b3c4a38e8730978345a77c48a43bd4
9 changes: 5 additions & 4 deletions Doc/howto/a-conceptual-overview-of-asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ Creating a task automatically schedules it for execution (by adding a
callback to run it in the event loop's to-do list, that is, collection of jobs).

:mod:`!asyncio` automatically associates tasks with the event loop for you.
Typically there's only one event loop, so that's quite straightforward.
It's uncommon, but some applications use multithreading and :mod:`!asyncio`
together, where there's one event loop per thread, stored in thread-local
storage.
This automatic association was purposely designed into :mod:`!asyncio` for
the sake of simplicity.
Without it, you'd have to keep track of the event loop object and pass it to
any coroutine function that wants to create tasks, adding redundant clutter
to your code.

::

Expand Down
Loading