summaryrefslogtreecommitdiff
path: root/includes/Threads.h
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-17 11:17:57 -0800
committerPixel <pixel@nobis-crew.org>2011-11-17 11:17:57 -0800
commit2cb2961c9f6062e867b6ccc3d9067f55c7b81ea4 (patch)
tree7846e0849a6f2cde216596a1ab144a69c50f5a60 /includes/Threads.h
parente435e4bb3c0744acf5b36c6e441d309d10af1257 (diff)
Cleaning some code, redesigning a bit the stack allocation problem from the task manager, and actually implementing it properly.
Diffstat (limited to 'includes/Threads.h')
-rw-r--r--includes/Threads.h2
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);