MCPcopy Create free account
hub / github.com/deskflow/deskflow / addEvent

Method addEvent

src/lib/platform/OSXEventQueueBuffer.cpp:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58bool OSXEventQueueBuffer::addEvent(uint32_t dataID)
59{
60 // Use GCD to dispatch event addition on the main queue
61 dispatch_async(dispatch_get_main_queue(), ^{
62 std::scoped_lock lock{this->m_mutex};
63 LOG_DEBUG2("adding user event with dataID: %u", dataID);
64 this->m_dataQueue.push(dataID);
65 this->m_cond.notify_one();
66 LOG_DEBUG2("user event added to queue, dataID=%u", dataID);
67 });
68
69 // Always return true since dispatch_async does not fail under normal conditions
70 return true;
71}
72
73bool OSXEventQueueBuffer::isEmpty() const
74{

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected