4
Contributors
3
Replies
14
Views
3 Years
Discussion Span
Last Post by Ketsuekiame
0

You may want more than one random number generator so that you have more than one sequence at a time.

Also, if it were static, you'd have to include code to make it thread safe across the entire system.

0

Random number generators, in a lot of cases, need to be deterministic and you often need more than one in order for it to remain deterministic.

If the RNG were static, you would be limited to one. Due to threading, this means that the RNG may not be deterministic. For example; if two threads run within nanoseconds of each other, different executions may end up getting the numbers switched around, even in a "deterministic" scenario.

Additionally, there is more than one type of RNG. The standard RNG is unsuitable for cryptography, so there is a special one for that purpose.

Edited by Ketsuekiame

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.