]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-107803: double linked list implementation for asyncio tasks (GH-107804)
authorKumar Aditya <kumaraditya@python.org>
Sat, 22 Jun 2024 17:58:35 +0000 (23:28 +0530)
committerGitHub <noreply@github.com>
Sat, 22 Jun 2024 17:58:35 +0000 (10:58 -0700)
commit4717aaa1a72d1964f1531a7c613f37ce3d9056d9
tree725e3b743d4ef707e89f5abe7804fce58fbd5036
parente21347549535b16f51a39986b78a2c2cd4ed09f4
GH-107803: double linked list implementation for asyncio tasks (GH-107804)

* linked list

* add tail optmiization to linked list

* wip

* wip

* wip

* more fixes

* finally it works

* add tests

* remove weakreflist

* add some comments

* reduce code duplication in _asynciomodule.c

* address some review comments

* add invariants about the state of the linked list

* add better explanation

* clinic regen

* reorder branches for better branch prediction

* Update Modules/_asynciomodule.c

* Apply suggestions from code review

Co-authored-by: Itamar Oren <itamarost@gmail.com>
* fix capturing of eager tasks

* add comment to task finalization

* fix tests and couple c implmentation to c task

improved linked-list logic and more comments

* fix test

---------

Co-authored-by: Itamar Oren <itamarost@gmail.com>
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_global_strings.h
Include/internal/pycore_runtime_init_generated.h
Include/internal/pycore_unicodeobject_generated.h
Lib/asyncio/tasks.py
Lib/test/test_asyncio/test_tasks.py
Modules/_asynciomodule.c
Modules/clinic/_asynciomodule.c.h