From 5e767e1c387acc0269f449899d8149cdb585495e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 3 Nov 2024 16:11:05 -0500 Subject: Make Int.random() use thread-local state --- stdlib/integers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'stdlib') 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); -- cgit v1.2.3