Fix a theoretical wrapping around issue in WSDQ

The Work-stealing dequeue indices could wrap around after ~2 billion
calls to steal(). This could probably be achieved in a few hours.
By using 64-bits indices, we avoid the problem entirely.
This commit is contained in:
Mathias Agopian
2019-06-28 17:47:47 -07:00
committed by Mathias Agopian
parent 31745f6025
commit 64c95c615a
2 changed files with 22 additions and 13 deletions

View File

@@ -208,7 +208,7 @@ TEST(JobSystem, JobSystemParallelChildren) {
JobSystem::Job* root = js.createJob<User, &User::func>(nullptr, &j);
for (int i=0 ; i<256 ; i++) {
JobSystem::Job* job = js.createJob<User, &User::func>(root, &j);
js.run(job);
js.run(job, JobSystem::DONT_SIGNAL);
}
js.runAndWait(root);