mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 10:29:02 +08:00
removed wait_empty() from tp and q
This commit is contained in:
@@ -71,13 +71,7 @@ public:
|
||||
pop_cv_.notify_one();
|
||||
return true;
|
||||
}
|
||||
|
||||
// wait until the queue is empty
|
||||
void wait_empty()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(queue_mutex_);
|
||||
pop_cv_.wait(lock, [this] { return this->q_.empty(); });
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
size_t max_items_;
|
||||
|
@@ -138,11 +138,7 @@ public:
|
||||
{
|
||||
return msg_counter_.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
void wait_empty()
|
||||
{
|
||||
q_.wait_empty();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::atomic<size_t> msg_counter_; // total # of messages processed in this pool
|
||||
|
Reference in New Issue
Block a user