HomePhabricator

Fix intermittent hang issue in scheduler_tests
bdcf5dea7c2eUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

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.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on May 21 2015, 16:57
deadalnixPushed on May 14 2017, 22:04
Parents
rABC0d862c2739b9: Merge pull request #6160
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABCbdcf5dea7c2e: Fix intermittent hang issue in scheduler_tests (authored by Wladimir J. van der Laan <laanwj@gmail.com>).May 21 2015, 17:07