mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
fix in queue clear
This commit is contained in:
parent
55eebf76f1
commit
91e6122819
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user