# Random123 reproducible independent and multithreaded

**URL:** https://discourse.julialang.org/t/random123-reproducible-independent-and-multithreaded/78699
**Category:** General Usage
**Tags:** multithreading, random
**Created:** [March 29, 2022, 8:13pm UTC](https://discourse.julialang.org/t/random123-reproducible-independent-and-multithreaded/78699 "2022-03-29T20:13:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Joris\_Pinkse](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joris_pinkse/32/216398_2.png) [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)
#### Post date: [March 29, 2022, 8:13pm UTC](https://discourse.julialang.org/t/random123-reproducible-independent-and-multithreaded/78699/1 "2022-03-29T20:13:57Z")

</div>

I wish to generate random numbers with multithreading that are independent, both within and across threads, and are reproducible in the sense that every time I run my code I get the same results.

My intention is to use Random123 and to use a different seed for each thread. How do I choose the seeds to ensure independence across threads? My current thinking is to just use the built-in rng to generate these seeds, but is that the right thing to do?
