Skip to content
Snippets Groups Projects
Commit db5d1b34 authored by Florian Fischer's avatar Florian Fischer
Browse files

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
Checking pipeline status
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment