void PendingChecks::runChecks() { DynMutex::Guard guard = m_mutex.lock(); Checks::iterator it = m_checks.begin(); bool removed = false; while (it != m_checks.end()) { bool cont; try { cont = (**it)(); } catch (...) { Exception::handle(HANDLE_EXCEPTION_FATAL); // keep compiler happy cont = false; } if (!cont) { // Done with this check Checks::iterator next = it; ++next; m_checks.erase(it); it = next; removed = true; } else { ++it; } } // Tell blockOnCheck() calls that they may have completed. if (removed) { m_cond.signal(); } }
void finish() { for (Checks::iterator i = checks.begin(), e = checks.end(); i != e; ++i) i->finish(); checks.clear(); }
void start() { for (Checks::iterator i = checks.begin(), e = checks.end(); i != e; ++i) i->start(); }