8000 gh-103092: Add a mutex to make the random state of rotatingtree concurrent-safe by aisk · Pull Request #115301 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-103092: Add a mutex to make the random state of rotatingtree concurrent-safe #115301

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 5 commits into from
Feb 29, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
try to fix Windows error
  • Loading branch information
aisk committed Feb 11, 2024
commit e5d4017dfb9a0cc21bed6bfe25670f535df5e492
4 changes: 3 additions & 1 deletion Modules/rotatingtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

static unsigned int random_value = 1;
static unsigned int random_stream = 0;
static PyMutex random_mutex = (PyMutex){0};
#define _zero 0
static PyMutex random_mutex = {0};
#undef _zero

static int
randombits(int bits)
Expand Down
0