| 48 | } |
| 49 | |
| 50 | void CommandQueue::enqueue(Command *command) |
| 51 | { |
| 52 | m_enqueueMutex.lock(); |
| 53 | m_commandQueue.push_back(command); |
| 54 | qDebug(CAT_COMMANDQUEUE) << "enqueued " << command << " " << m_commandQueue.size(); |
| 55 | m_enqueueMutex.unlock(); |
| 56 | |
| 57 | if(!m_running) { |
| 58 | start(); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | void CommandQueue::start() |
| 63 | { |