MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / aeDeleteEventLoop

Function aeDeleteEventLoop

src/ae.cpp:403–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403extern "C" void aeDeleteEventLoop(aeEventLoop *eventLoop) {
404 aeApiFree(eventLoop);
405 zfree(eventLoop->events);
406 zfree(eventLoop->fired);
407 fastlock_free(&eventLoop->flock);
408 close(eventLoop->fdCmdRead);
409 close(eventLoop->fdCmdWrite);
410
411 /* Free the time events list. */
412 auto *te = eventLoop->timeEventHead;
413 while (te)
414 {
415 auto *teNext = te->next;
416 zfree(te);
417 te = teNext;
418 }
419 zfree(eventLoop);
420}
421
422extern "C" void aeStop(aeEventLoop *eventLoop) {
423 serverAssert(g_eventLoopThisThread == NULL || g_eventLoopThisThread == eventLoop);

Callers 3

freeBenchmarkThreadFunction · 0.85
freeBenchmarkThreadFunction · 0.85
workerThreadMainFunction · 0.85

Calls 3

zfreeFunction · 0.85
fastlock_freeFunction · 0.85
aeApiFreeFunction · 0.70

Tested by

no test coverage detected