fix in queue clear

This commit is contained in:
gabime 2014-02-02 00:00:29 +02:00
parent 55eebf76f1
commit 91e6122819
2 changed files with 3 additions and 2 deletions

View File

@ -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();
} }

View File

@ -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;
} }
} }