Description
See https://stackoverflow.com/questions/4613693/random-next-sometimes-returns-same-number-in-separate-threads and https://csharpindepth.com/Articles/Random
The solution is to either switch to a round-robin mechanism or develop a thread-safe randomizer. Another possible solution that I am not to fond of is to detect that zero is being returned consecutively and re-instantiate the random instance.
Attachments
For Gerrit Dashboard: NCBC-3085 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
168724,3 | NCBC-3085: Random.Next eventually only returns zero | master | couchbase-net-client | Status: MERGED | +2 | +1 |