I just started learning about concurrency with MDN's recent release of their concurrency video course, and the discussion about race conditions got me thinking about how you could take advantage of it to improve the generation of random numbers.
Couldn't you spawn off several threads that all execute a custom rand() function (using different seeds) that all access the same memory? The result would be non-deterministic based on different processor loads and therefore a more-random random() function? Because this is such a simple solution I'm guessing someone has thought of it, and therefore it can't be as great as it seems.
Couldn't you spawn off several threads that all execute a custom rand() function (using different seeds) that all access the same memory? The result would be non-deterministic based on different processor loads and therefore a more-random random() function? Because this is such a simple solution I'm guessing someone has thought of it, and therefore it can't be as great as it seems.