MCPcopy
hub / github.com/google/uuid / EnableRandPool

Function EnableRandPool

uuid.go:366–368  ·  uuid.go::EnableRandPool

EnableRandPool enables internal randomness pool used for Random (Version 4) UUID generation. The pool contains random bytes read from the random number generator on demand in batches. Enabling the pool may improve the UUID generation throughput significantly. Since the pool is stored on the Go heap

()

Source from the content-addressed store, hash-verified

364// only be called when there is no possibility that New or any other
365// UUID Version 4 generation function will be called concurrently.
366func EnableRandPool() {
367 poolEnabled = true
368}
369
370// DisableRandPool disables the randomness pool if it was previously
371// enabled with EnableRandPool.

Callers 4

TestRandomUUID_PooledFunction · 0.85
TestRandPoolFunction · 0.85
BenchmarkUUID_NewPooledFunction · 0.85
TestVersion7_pooledFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestRandomUUID_PooledFunction · 0.68
TestRandPoolFunction · 0.68
BenchmarkUUID_NewPooledFunction · 0.68
TestVersion7_pooledFunction · 0.68