From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 20 May 2025 16:47:42 +0000 (+0200) Subject: [3.14] gh-128002: add what's new docs for `asyncio` (GH-134324) (#134362) X-Git-Tag: v3.14.0b2~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=402d983f27fd37ff6530ef9f04ad3e66402e4173;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-128002: add what's new docs for `asyncio` (GH-134324) (#134362) gh-128002: add what's new docs for `asyncio` (GH-134324) (cherry picked from commit 0584533dc70b4efdb65fd53fbb5beddbc7a302a8) Co-authored-by: Kumar Aditya --- diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst index b192615e173f..604f3365ebff 100644 --- a/Doc/whatsnew/3.14.rst +++ b/Doc/whatsnew/3.14.rst @@ -1997,11 +1997,19 @@ Optimizations asyncio ------- -* :mod:`asyncio` now uses double linked list implementation for native tasks - which speeds up execution by 10% on standard pyperformance benchmarks and - reduces memory usage. +* :mod:`asyncio` has a new per-thread double linked list implementation internally for + :class:`native tasks ` which speeds up execution by 10-20% on standard + pyperformance benchmarks and reduces memory usage. + This enables external introspection tools such as + :ref:`python -m asyncio pstree ` + to introspect the call graph of asyncio tasks running in all threads. (Contributed by Kumar Aditya in :gh:`107803`.) +* :mod:`asyncio` has first class support for :term:`free-threading builds `. + This enables parallel execution of multiple event loops across different threads and scales + linearly with the number of threads. + (Contributed by Kumar Aditya in :gh:`128002`.) + * :mod:`asyncio` has new utility functions for introspecting and printing the program's call graph: :func:`asyncio.capture_call_graph` and :func:`asyncio.print_call_graph`. @@ -2083,7 +2091,6 @@ Deprecated * :class:`asyncio.WindowsProactorEventLoopPolicy` * :func:`asyncio.get_event_loop_policy` * :func:`asyncio.set_event_loop_policy` - * :func:`asyncio.set_event_loop` Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with *loop_factory* to use the desired event loop implementation.