void runImpl () { beast::Thread::setCurrentThreadName ("LedgerCleaner"); JLOG (j_.debug()) << "Started"; init(); while (true) { { std::unique_lock<std::mutex> lock (mutex_); wakeup_.wait(lock, [this]() { return ( shouldExit_ || state_ == State::startCleaning); }); if (shouldExit_) break; state_ = State::cleaning; } doLedgerCleaner(); } stopped(); }
void run () { m_journal.debug << "Started"; init (); while (! this->threadShouldExit()) { this->wait (); if (! this->threadShouldExit()) { doLedgerCleaner(); } } stopped(); }