summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--orkaudio/ThreadSafeQueue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/orkaudio/ThreadSafeQueue.h b/orkaudio/ThreadSafeQueue.h
index c14b5b9..4fd0cda 100644
--- a/orkaudio/ThreadSafeQueue.h
+++ b/orkaudio/ThreadSafeQueue.h
@@ -64,8 +64,13 @@ template <class T> bool ThreadSafeQueue<T>::push(T &element)
/** Pop and element from the queue, or blocks until one available */
template <class T> T ThreadSafeQueue<T>::pop()
{
+// #### Fixme: when timeout specified under Linux CentOS 4.2, acquire returns immediately instead of waiting for the timeout -> causes CPU to spike at 100%
+#ifdef WIN32
ACE_Time_Value timeout(time(NULL)+2);
m_semaphore.acquire(&timeout);
+#else
+ m_semaphore.acquire();
+#endif
MutexSentinel mutexSentinel(m_mutex);
T element;