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
revert changes to event-loop/thread discussion.
  • Loading branch information
anordin95 committed Aug 27, 2025
commit e475aef6fe38a7915dbe44527570049bf09e2025
8 changes: 3 additions & 5 deletions Doc/howto/a-conceptual-overview-of-asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,9 @@ 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).
The recommended way to create tasks is via :func:`asyncio.create_task`.

: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.
Since there's only one event loop (in each thread), :mod:`!asyncio` takes
care of associating the task with the event loop for you.
As such, there's no need to specify the event loop.
Comment thread
ZeroIntensity marked this conversation as resolved.

::

Expand Down
Loading