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

Method monitoringLoopThread

Libraries/Async/Async.cpp:1195–1212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1193}
1194
1195SC::Result SC::AsyncEventLoopMonitor::monitoringLoopThread(Thread& thread)
1196{
1197 thread.setThreadName(SC_NATIVE_STR("Monitoring Loop thread"));
1198 do
1199 {
1200 eventObjectEnterBlockingMode.wait();
1201 // Block to poll for events and store them into asyncKernelEvents
1202 Result res = eventLoop->blockingPoll(asyncKernelEvents);
1203 needsWakeUp.exchange(false);
1204 onNewEventsAvailable();
1205 eventObjectExitBlockingMode.signal();
1206 if (not res)
1207 {
1208 return res;
1209 }
1210 } while (not finished.load());
1211 return Result(true);
1212}
1213
1214SC::Result SC::AsyncEventLoopMonitor::stopMonitoringAndDispatchCompletions()
1215{

Callers

nothing calls this directly

Calls 7

blockingPollMethod · 0.80
ResultClass · 0.70
setThreadNameMethod · 0.45
waitMethod · 0.45
exchangeMethod · 0.45
signalMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected