Check suspended coros for JobQueue stop condition

This commit is contained in:
Vinnie Falco
2016-02-26 15:07:46 -05:00
parent 73df97f2d0
commit 94a47569d6
3 changed files with 19 additions and 2 deletions

View File

@@ -339,11 +339,13 @@ JobQueue::checkStopped (std::lock_guard <std::mutex> const& lock)
// 2. All Stoppable children have stopped
// 3. There are no executing calls to processTask
// 4. There are no remaining Jobs in the job set
// 5. There are no suspended coroutines
//
if (isStopping() &&
areChildrenStopped() &&
(m_processCount == 0) &&
m_jobSet.empty())
m_jobSet.empty() &&
nSuspend_ == 0)
{
stopped();
}