| 43 | } |
| 44 | |
| 45 | IEventQueueBuffer::Type SimpleEventQueueBuffer::getEvent(Event &, uint32_t &dataID) |
| 46 | { |
| 47 | ArchMutexLock lock(m_queueMutex); |
| 48 | if (!m_queueReady) { |
| 49 | return IEventQueueBuffer::Type::Unknown; |
| 50 | } |
| 51 | dataID = m_queue.back(); |
| 52 | m_queue.pop_back(); |
| 53 | m_queueReady = !m_queue.empty(); |
| 54 | return IEventQueueBuffer::Type::User; |
| 55 | } |
| 56 | |
| 57 | bool SimpleEventQueueBuffer::addEvent(uint32_t dataID) |
| 58 | { |