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

Function EnableRandPool

uuid.go:338–340  ·  view source on GitHub ↗

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

336// only be called when there is no possibility that New or any other
337// UUID Version 4 generation function will be called concurrently.
338func EnableRandPool() {
339 poolEnabled = true
340}
341
342// DisableRandPool disables the randomness pool if it was previously
343// 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