The pattern I’ve used above should be fine. For something more elegant, see: Sum result of Threads.foreach() - #10 by tkf
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Is this pattern still thread safe in Julia 1.12? | 14 | 622 | October 29, 2025 | |
| Parallel Mersenne Twister | 18 | 2472 | January 19, 2020 | |
| How to run multiple threads, all using the same sequence of pseudorandom numbers, in Julia? | 9 | 1137 | August 30, 2021 | |
| Number of threads available seems random (using @spawn) | 19 | 1388 | August 25, 2020 | |
| Multithreading and random number generators | 7 | 3728 | March 15, 2021 |