Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix a data race on thread handle identifiers when ``_thread._shutdown()``
runs concurrently with the startup of non-daemon threads in the
free-threaded build.
2 changes: 1 addition & 1 deletion Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2349,7 +2349,7 @@ thread_shutdown(PyObject *self, PyObject *args)
struct llist_node *node;
llist_for_each_safe(node, &state->shutdown_handles) {
ThreadHandle *cur = llist_data(node, ThreadHandle, shutdown_node);
if (cur->ident != ident) {
if (ThreadHandle_ident(cur) != ident) {
ThreadHandle_incref(cur);
handle = cur;
break;
Expand Down
Loading