diff options
| author | gingerBill <bill@gingerbill.org> | 2024-06-15 15:46:48 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-06-15 15:46:48 +0100 |
| commit | 2380720fa293bdc0eb2c564b232b5083d9742154 (patch) | |
| tree | c5dd06c765b64e168afa6cc4afc797ed22208ed2 /core/sync | |
| parent | 149ecafdeff6ff2b579ab1c979c147fd04fe4228 (diff) | |
Fix `core:sync/chan` for rand
Diffstat (limited to 'core/sync')
| -rw-r--r-- | core/sync/chan/chan.odin | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/sync/chan/chan.odin b/core/sync/chan/chan.odin index f4774e4f8..0c3f4a725 100644 --- a/core/sync/chan/chan.odin +++ b/core/sync/chan/chan.odin @@ -476,10 +476,7 @@ select_raw :: proc "odin" (recvs: []^Raw_Chan, sends: []^Raw_Chan, send_msgs: [] return } - r: ^rand.Rand = nil - - - select_idx = rand.int_max(count, r) if count > 0 else 0 + select_idx = rand.int_max(count) if count > 0 else 0 sel := candidates[select_idx] if sel.is_recv { |