diff options
Diffstat (limited to 'includes/Threads.h')
-rw-r--r-- | includes/Threads.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/Threads.h b/includes/Threads.h index a1f270e..256e8e3 100644 --- a/includes/Threads.h +++ b/includes/Threads.h @@ -41,7 +41,7 @@ template<class T> class Queue { public: Queue() { pthread_cond_init(&m_cond, NULL); } - ~Queue() { pthread_cond_destroy(&m_cond); } + ~Queue() { while (size()) pop(); pthread_cond_destroy(&m_cond); } void push(T & t) { m_lock.enter(); m_queue.push(t); |