folly::ThreadLocalPRNG

A PRNG with one instance per thread. This PRNG uses a mersenne twister random number generator and is seeded from /dev/urandom. It should not be used for anything which requires security, only for statistical randomness.

Synopsis

Declared in <folly/Random.h>

class ThreadLocalPRNG;

Type Aliases

NameDescription
result_type The unsigned integer type produced by this generator.

Member Functions

NameDescription
operator() Returns the next pseudorandom value from the thread-local generator.

Static Member Functions

NameDescription
max Returns the largest value the generator can produce.
min Returns the smallest value the generator can produce.