MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / dequeueEvent

Method dequeueEvent

Libraries/HttpClient/HttpClient.cpp:1384–1398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1382}
1383
1384bool SC::HttpClientOperation::dequeueEvent(HttpClientOperationEvent& event)
1385{
1386 eventMutex.lock();
1387 if (eventCount == 0)
1388 {
1389 eventMutex.unlock();
1390 return false;
1391 }
1392 event = eventQueue[eventHead];
1393 eventHead = (eventHead + 1) % eventQueue.sizeInElements();
1394 eventCount -= 1;
1395 eventCV.signal();
1396 eventMutex.unlock();
1397 return true;
1398}
1399
1400bool SC::HttpClientOperation::hasPendingEvents() const
1401{

Callers

nothing calls this directly

Calls 3

lockMethod · 0.45
unlockMethod · 0.45
signalMethod · 0.45

Tested by

no test coverage detected