You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix NewULID for systems with low time resolution (#270)
NewULID uses a pool of rand.Source using time.Now() as seed. In some systems with high concurrency and lower time resolution, this leads to multiple sources with the same sead, making NewULID return equal values on subsequent calls.
This commit changes the seed to add a random number from the global shared rand.Source (which is thread-safe).
Signed-off-by: Santiago M. Mola <[email protected]>
0 commit comments