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

Function DisableRandPool

uuid.go:376–381  ·  view source on GitHub ↗

DisableRandPool disables the randomness pool if it was previously enabled with EnableRandPool. Both EnableRandPool and DisableRandPool are not thread-safe and should only be called when there is no possibility that New or any other UUID Version 4 generation function will be called concurrently.

()

Source from the content-addressed store, hash-verified

374// only be called when there is no possibility that New or any other
375// UUID Version 4 generation function will be called concurrently.
376func DisableRandPool() {
377 poolEnabled = false
378 defer poolMu.Unlock()
379 poolMu.Lock()
380 poolPos = randPoolSize
381}
382
383// UUIDs is a slice of UUID types.
384type UUIDs []UUID

Callers 3

TestRandomUUID_PooledFunction · 0.85
TestRandPoolFunction · 0.85
TestVersion7_pooledFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestRandomUUID_PooledFunction · 0.68
TestRandPoolFunction · 0.68
TestVersion7_pooledFunction · 0.68