It looks very much to me like we were able to occasionally sneak by the checks and shutdown the omgr too early in the following condition:
- PresentsInvoker decides it's empty - It waits on other dependencies - During the wait, something (probably from one of the other dependencies) posts to the PresentsInvoker - We loop back around, the dependencies are empty - We end early, with the posted bit still to be done... So... after waiting, do a quick check for emptyness and if not satisfied, start the whole dern cycle over. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6005 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -157,6 +157,17 @@ public class PresentsInvoker extends ReportingInvoker
|
||||
} catch (InterruptedException e) {
|
||||
// Not a problem, we'll just check on the checkers again
|
||||
}
|
||||
|
||||
// While we were waiting on the various invokers, one of them might have
|
||||
// given us something to do, in which case we really shouldn't be
|
||||
// continuing on with this...
|
||||
if (getPendingUnits() > 0) {
|
||||
_loopCount++;
|
||||
releaseCheckers(checkers);
|
||||
postUnit(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
} else {
|
||||
// All the checkers are blocking their respective threads. That means
|
||||
// if their queues are empty, nothing else is running.
|
||||
|
||||
Reference in New Issue
Block a user