From 55eebf76f1fc6b124d01746d6af85f95ae1ab7dc Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 1 Feb 2014 23:49:55 +0200 Subject: [PATCH] clear fix --- include/c11log/details/blocking_queue.h | 2 +- src/test.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) 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;