diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-05-21 18:57:10 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-05-21 19:07:10 +0200 |
commit | bdcf5dea7c2e7493be7d8fc157e168b77cce7dcc (patch) | |
tree | d53175023a197c475a2c3d797367867bfde80791 /share | |
parent | 0d862c2739b96005fdf0e2a4df347e7291956fc1 (diff) |
Fix intermittent hang issue in scheduler_tests
Don't clear `stopRequested` and `stopWhenEmpty` at the top of
`serviceQueue`, as this results in a race condition: on systems under
heavy load, some of the threads only get scheduled on the CPU when the
other threads have already finished their work. This causes the flags to
be cleared post-hoc and thus those threads to wait forever.
The potential drawback of this change is that the scheduler cannot be
restarted after being stopped (an explicit reset would be needed), but
we don't use this functionality anyway.
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions