Uh oh!
There was an error while loading. Please reload this page.
gh-112087: Update list impl to be thread-safe with manual CS - #113863
Conversation
corona10
commented
Jan 9, 2024
The rest of the parts can be separated into two parts. A is a headache; atomic operation with default build will require some overhead than pure operation; not sure how we can solve this with a seamless approach. B is quite simple; if we already have similar APIs, then we can just use them. If not, we should introduce one. |
colesbury
left a comment
There was a problem hiding this comment.
Looks good other than the unused variable.
I scanned through listobject.c and it looks like there are still other functions that should be fairly straightforward to make thread-safe, such as list_copy_impl and list_append.
What do you mean by "xxx_lock implementations"?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
corona10
commented
Jan 13, 2024
@colesbury Updated PTAL :) |
corona10
commented
Jan 13, 2024
It was about list_item_locked things that you updated implementations to use _Py_atomic_store/load operations. |
colesbury
left a comment
There was a problem hiding this comment.
LGTM.
I wonder if it's worth doing something to abstract out the locking in type slots (like tp_richcompare).
corona10
commented
Jan 16, 2024
It might be up to case, |
listobjects thread-safe in--disable-gilbuilds #112087