gh-151644: Fix data race in sys.setdlopenflags/getdlopenflags under free-threading by zangjiucheng · Pull Request #151768 · python/cpython · GitHub
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
21 changes: 21 additions & 0 deletions Lib/test/test_free_threading/test_sys.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fix a data race in :func:`sys.setdlopenflags` and :func:`sys.getdlopenflags`
when called concurrently in the free-threaded build. The underlying
``_PyImport_GetDLOpenFlags`` and ``_PyImport_SetDLOpenFlags`` functions now
use atomic load/store operations.
4 changes: 2 additions & 2 deletions Python/import.c
Loading