mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-03 18:29:21 +02:00
Expose if CScheduler is being serviced, assert its not in EmptyQueue
This commit is contained in:
@@ -140,6 +140,10 @@ size_t CScheduler::getQueueInfo(boost::chrono::system_clock::time_point &first,
|
||||
return result;
|
||||
}
|
||||
|
||||
bool CScheduler::AreThreadsServicingQueue() const {
|
||||
return nThreadsServicingQueue;
|
||||
}
|
||||
|
||||
|
||||
void SingleThreadedSchedulerClient::MaybeScheduleProcessQueue() {
|
||||
{
|
||||
@@ -193,6 +197,7 @@ void SingleThreadedSchedulerClient::AddToProcessQueue(std::function<void (void)>
|
||||
}
|
||||
|
||||
void SingleThreadedSchedulerClient::EmptyQueue() {
|
||||
assert(!m_pscheduler->AreThreadsServicingQueue());
|
||||
bool should_continue = true;
|
||||
while (should_continue) {
|
||||
ProcessQueue();
|
||||
|
||||
Reference in New Issue
Block a user