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

Method addEventToBuffer

src/lib/base/EventQueue.cpp:198–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198void EventQueue::addEventToBuffer(Event &&event)
199{
200 std::scoped_lock lock{m_mutex};
201
202 // store the event's data locally
203 auto eventID = saveEvent(std::move(event));
204
205 // add it
206 if (!m_buffer->addEvent(eventID)) {
207 // failed to send event
208 auto removedEvent = removeEvent(eventID);
209 Event::deleteData(removedEvent);
210 }
211}
212
213EventQueueTimer *EventQueue::newTimer(double duration, void *target)
214{

Callers

nothing calls this directly

Calls 1

addEventMethod · 0.45

Tested by

no test coverage detected