diff --git a/include/c11log/details/blocking_queue.h b/include/c11log/details/blocking_queue.h index 92a3ca63..53071dc5 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_ = queue_t{}; + q_.swap(queue_t()); } item_popped_cond_.notify_all(); } diff --git a/src/test.cpp b/src/test.cpp index 58e143af..5f9424b5 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -86,9 +86,7 @@ void testq(int size, int pushers, int poppers) for(int i = 0; i < pushers; i++) new std::thread(std::bind(pusher, &q)); - - - + while(active) { using std::endl;