From 8b0b857eaaa50c6ec217a46c0577395c78ec04c7 Mon Sep 17 00:00:00 2001 From: sapier Date: Mon, 6 Jan 2014 12:45:42 +0100 Subject: Make MutexQueue use jsemaphore for signaling --- src/connection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/connection.cpp') diff --git a/src/connection.cpp b/src/connection.cpp index 8f83f6219..bc9279649 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -592,8 +592,9 @@ void * Connection::Thread() runTimeouts(dtime); + //NOTE this is only thread safe for ONE consumer thread! while(!m_command_queue.empty()){ - ConnectionCommand c = m_command_queue.pop_front(); + ConnectionCommand c = m_command_queue.pop_frontNoEx(); processCommand(c); } @@ -1556,7 +1557,7 @@ ConnectionEvent Connection::getEvent() e.type = CONNEVENT_NONE; return e; } - return m_event_queue.pop_front(); + return m_event_queue.pop_frontNoEx(); } ConnectionEvent Connection::waitEvent(u32 timeout_ms) -- cgit v1.2.3