prevent data races when initializing the workers PRNG seeds
Each worker currently calls uniformIntDistribution(randomEngine) which modifies the randomEngine internally and thus produces data races when the threads run in parallel. This change calls uniformIntDistribution(randomEngine) on the main thread for each worker and passes the resulting seeds to the workerLoop. The data race was found by gcc's tsan.
parent
f6d67a88
No related branches found
No related tags found
Loading
Please register or sign in to comment