-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-135557: Use atomic writes on heapq operations #135601
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
base: main
Are you sure you want to change the base?
Conversation
I think this could be "skip news"? |
This is user-facing, so this does need a news. Something like "Fix race with lists and |
f7fbb68
to
08770ec
Compare
Misc/NEWS.d/next/Library/2025-06-17-23-13-56.gh-issue-135557.Bfcy4v.rst
Outdated
Show resolved
Hide resolved
0184b21
to
463963d
Compare
463963d
to
c49ff7d
Compare
PyList_SET_ITEM(heap, 0, lastelt); | ||
if (siftup_func((PyListObject *)heap, 0)) { | ||
PyListObject *list = _PyList_CAST(heap); | ||
FT_ATOMIC_STORE_PTR_RELAXED(list->ob_item[0], lastelt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar change is needed in heappushpop and heapreplace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is needed in heappushpop_max and min as well
…fcy4v.rst Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
c49ff7d
to
27d6cb6
Compare
2cc859d
to
8cf4794
Compare
8cf4794
to
32d767f
Compare
Use atomic writes on heapq operation.