integration from bus into ebusloop continued.

This commit is contained in:
Roland Jax
2014-11-07 20:58:15 +01:00
parent 6db67385b5
commit 6b0f58b291
6 changed files with 435 additions and 242 deletions
+14
View File
@@ -64,6 +64,20 @@ public:
return item;
}
T next()
{
pthread_mutex_lock(&m_mutex);
while (m_queue.size() == 0)
pthread_cond_wait(&m_cond, &m_mutex);
T item = m_queue.front();
pthread_mutex_unlock(&m_mutex);
return item;
}
int size()
{
pthread_mutex_lock(&m_mutex);