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

Name

Description

result_type

The unsigned integer type produced by this generator.

Member Functions

Name

Description

operator()

Returns the next pseudorandom value from the thread‐local generator.

Static Member Functions

Name

Description

max

Returns the largest value the generator can produce.

min

Returns the smallest value the generator can produce.

Created with MrDocs