mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Make MutexQueue use jsemaphore for signaling
This commit is contained in:
parent
10fdbf7375
commit
8b0b857eaa
13 changed files with 248 additions and 99 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue