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:
committed by
Mathias Agopian
parent
31745f6025
commit
64c95c615a
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user