8000 GH-107803: double linked list implementation for asyncio tasks by kumaraditya303 · Pull Request #107804 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-107803: double linked list implementation for asyncio tasks #107804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 35 commits into from
Jun 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
cc66eeb
linked list
kumaraditya303 May 24, 2023
d5a3d87
add tail optmiization to linked list
kumaraditya303 May 26, 2023
a0c5fcf
wip
kumaraditya303 May 26, 2023
77d012f
wip
kumaraditya303 May 28, 2023
5d9653d
wip
kumaraditya303 May 28, 2023
5a00198
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Jun 16, 2023
4cdc834
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 2, 2023
35a00f1
more fixes
kumaraditya303 Aug 2, 2023
fddb9d6
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 5, 2023
1d32835
finally it works
kumaraditya303 Aug 5, 2023
b46bcfe
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 8, 2023
ee7ead2
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 9, 2023
af0280a
add tests
kumaraditya303 Aug 9, 2023
999fff7
remove weakreflist
kumaraditya303 Aug 10, 2023
87a2231
add some comments
kumaraditya303 Aug 10, 2023
1812408
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 12, 2023
3cb5673
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 15, 2023
9552636
reduce code duplication in _asynciomodule.c
kumaraditya303 Aug 15, 2023
5c5b559
address some review comments
kumaraditya303 Aug 17, 2023
82cf69b
add invariants about the state of the linked list
kumaraditya303 Aug 17, 2023
8998f6a
add better explanation
kumaraditya303 Aug 17, 2023
d93c4e1
clinic regen
kumaraditya303 Aug 17, 2023
35726d9
reorder branches for better branch prediction
kumaraditya303 Aug 17, 2023
8dd0492
Update Modules/_asynciomodule.c
kumaraditya303 Aug 18, 2023
8325302
Apply suggestions from code review
kumaraditya303 Aug 19, 2023
80b65e0
fix capturing of eager tasks
kumaraditya303 Aug 19, 2023
b67649e
add comment to task finalization
kumaraditya303 Aug 20, 2023
1252b2f
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 20, 2023
457739a
Merge branch 'main' into linked-list
kumaraditya303 Aug 20, 2023
4670731
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 24, 2023
e061081
fix tests and couple c implmentation to c task
kumaraditya303 Aug 24, 2023
836d254
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Aug 30, 2023
efce4b3
fix test
kumaraditya303 Aug 30, 2023
c7b604c
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Jun 21, 2024
56beb04
Merge branch 'main' of https://github.com/python/cpython into linked-…
kumaraditya303 Jun 22, 2024
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
Merge branch 'main' of https://github.com/python/cpython into linked-…
…list
  • Loading branch information
kumaraditya303 committed Jun 16, 2023
commit 5a001984f355c20eb56db5bf4387fa8587141065
23 changes: 11 additions & 12 deletions Modules/_asynciomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ typedef enum {
PyObject *prefix##_result; \
PyObject *prefix##_source_tb; \
PyObject *prefix##_cancel_msg; \
fut_state prefix##_state; \
int prefix##_log_tb; \
int prefix##_blocking; \
PyObject *dict; \
PyObject *prefix##_weakreflist; \
PyObject *prefix##_cancelled_exc;
PyObject *prefix##_cancelled_exc; \
fut_state prefix##_state; \
/* These bitfields need to be at the end of the struct
so that these and bitfields from TaskObj are contiguous.
*/ \
unsigned prefix##_log_tb: 1; \
unsigned prefix##_blocking: 1;

typedef struct {
FutureObj_HEAD(fut)
} FutureObj;

typedef struct TaskObj {
typedef struct {
FutureObj_HEAD(task)
unsigned task_must_cancel: 1;
unsigned task_log_destroy_pending: 1;
int task_num_cancels_requested;
PyObject *task_fut_waiter;
PyObject *task_coro;
PyObject *task_name;
PyObject *task_context;
int task_must_cancel;
int task_log_destroy_pending;
int task_num_cancels_requested;
struct TaskObj *next;
struct TaskObj *prev;
} TaskObj;

typedef struct {
Expand Down Expand Up @@ -161,7 +161,6 @@ get_asyncio_state_by_def(PyObject *self)
return get_asyncio_state(mod);
}


#include "clinic/_asynciomodule.c.h"


Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.
0