| 44 | } |
| 45 | |
| 46 | void EventQueue::enqueue( |
| 47 | const EventType type, |
| 48 | const std::string &fromDirectory, |
| 49 | const std::string &fromFile, |
| 50 | const std::string &toDirectory, |
| 51 | const std::string &toFile |
| 52 | ) { |
| 53 | if (mPaused) { |
| 54 | return; |
| 55 | } |
| 56 | std::lock_guard<std::mutex> lock(mutex); |
| 57 | queue.emplace_back(std::unique_ptr<Event>(new Event(type, fromDirectory, fromFile, toDirectory, toFile))); |
| 58 | } |
| 59 | |
| 60 | void EventQueue::pause() { |
| 61 | mPaused = true; |
no outgoing calls
no test coverage detected