aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-03 16:11:05 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-03 16:11:05 -0500
commit5e767e1c387acc0269f449899d8149cdb585495e (patch)
treef7c4058a85fc95a8a06ed0ba36ee26cc056ec653
parent7ccb7a8a9b8f10d30fd8fca01e849dcad354a855 (diff)
Make Int.random() use thread-local state
-rw-r--r--stdlib/integers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdlib/integers.c b/stdlib/integers.c
index 8d305daf..6b0a9dd2 100644
--- a/stdlib/integers.c
+++ b/stdlib/integers.c
@@ -14,7 +14,7 @@
#include "text.h"
#include "types.h"
-static gmp_randstate_t Int_rng = {};
+static _Thread_local gmp_randstate_t Int_rng = {};
public void Int$init_random(long seed) {
gmp_randinit_default(Int_rng);