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

Function DisableRandPool

uuid.go:348–353  ·  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

346// only be called when there is no possibility that New or any other
347// UUID Version 4 generation function will be called concurrently.
348func DisableRandPool() {
349 poolEnabled = false
350 defer poolMu.Unlock()
351 poolMu.Lock()
352 poolPos = randPoolSize
353}
354
355// UUIDs is a slice of UUID types.
356type 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