diff --git a/include/c11log/details/blocking_queue.h b/include/c11log/details/blocking_queue.h index 53071dc5..f15fde62 100644 --- a/include/c11log/details/blocking_queue.h +++ b/include/c11log/details/blocking_queue.h @@ -97,7 +97,7 @@ public: { { std::unique_lock ul(mutex_); - q_.swap(queue_t()); + queue_t().swap(q_); } item_popped_cond_.notify_all(); } diff --git a/src/test.cpp b/src/test.cpp index 5f9424b5..c8c6f44e 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -70,7 +70,8 @@ void popper(Q* q) string output; while(active) { - q->pop(output); + //q->pop(output); + q->clear(); ++pop_count; } }