MCPcopy Create free account
hub / github.com/dobin/RedEdr / StopEventProcessor

Function StopEventProcessor

RedEdr/event_processor.cpp:315–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313
314
315void StopEventProcessor() {
316 // Signal stop
317 if (hStopEventProcessor != NULL) {
318 SetEvent(hStopEventProcessor);
319 }
320
321 if (EventProcessor_thread != NULL) {
322 g_EventAggregator.Stop();
323
324 if (WaitForSingleObject(EventProcessor_thread, 5000) == WAIT_TIMEOUT) {
325 LOG_A(LOG_WARNING, "EventProcessor: Thread did not exit in time, force-terminating");
326 TerminateThread(EventProcessor_thread, 1);
327 }
328 // handle ownership stays with the threads vector; do not close here
329 }
330
331 if (hStopEventProcessor != NULL) {
332 CloseHandle(hStopEventProcessor);
333 hStopEventProcessor = NULL;
334 }
335}
336

Callers 1

ManagerShutdownFunction · 0.85

Calls 2

StopMethod · 0.80
LOG_AFunction · 0.70

Tested by

no test coverage detected