mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 09:09:35 +08:00
fix in queue clear
This commit is contained in:
@@ -97,7 +97,7 @@ public:
|
|||||||
{
|
{
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> ul(mutex_);
|
std::unique_lock<std::mutex> ul(mutex_);
|
||||||
q_.swap(queue_t());
|
queue_t().swap(q_);
|
||||||
}
|
}
|
||||||
item_popped_cond_.notify_all();
|
item_popped_cond_.notify_all();
|
||||||
}
|
}
|
||||||
|
@@ -70,7 +70,8 @@ void popper(Q* q)
|
|||||||
string output;
|
string output;
|
||||||
while(active)
|
while(active)
|
||||||
{
|
{
|
||||||
q->pop(output);
|
//q->pop(output);
|
||||||
|
q->clear();
|
||||||
++pop_count;
|
++pop_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user