@@ -1997,11 +1997,19 @@ Optimizations
1997
1997
asyncio
1998
1998
-------
1999
1999
2000
- * :mod: `asyncio ` now uses double linked list implementation for native tasks
2001
- which speeds up execution by 10% on standard pyperformance benchmarks and
2002
- reduces memory usage.
2000
+ * :mod: `asyncio ` has a new per-thread double linked list implementation internally for
2001
+ :class: `native tasks <asyncio.Task> ` which speeds up execution by 10-20% on standard
2002
+ pyperformance benchmarks and reduces memory usage.
2003
+ This enables external introspection tools such as
2004
+ :ref: `python -m asyncio pstree <whatsnew314-asyncio-introspection >`
2005
+ to introspect the call graph of asyncio tasks running in all threads.
2003
2006
(Contributed by Kumar Aditya in :gh: `107803 `.)
2004
2007
2008
+ * :mod: `asyncio ` has first class support for :term: `free-threading builds <free threading> `.
2009
+ This enables parallel execution of multiple event loops across different threads and scales
2010
+ linearly with the number of threads.
2011
+ (Contributed by Kumar Aditya in :gh: `128002 `.)
2012
+
2005
2013
* :mod: `asyncio ` has new utility functions for introspecting and printing
2006
2014
the program's call graph: :func: `asyncio.capture_call_graph ` and
2007
2015
:func: `asyncio.print_call_graph `.
@@ -2083,7 +2091,6 @@ Deprecated
2083
2091
* :class: `asyncio.WindowsProactorEventLoopPolicy `
2084
2092
* :func: `asyncio.get_event_loop_policy `
2085
2093
* :func: `asyncio.set_event_loop_policy `
2086
- * :func: `asyncio.set_event_loop `
2087
2094
2088
2095
Users should use :func: `asyncio.run ` or :class: `asyncio.Runner ` with
2089
2096
*loop_factory * to use the desired event loop implementation.
0 commit comments