Commit 91e61228 authored by gabime's avatar gabime

fix in queue clear

parent 55eebf76
...@@ -97,7 +97,7 @@ public: ...@@ -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) ...@@ -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;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment