| 401 | } |
| 402 | |
| 403 | extern "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 | |
| 422 | extern "C" void aeStop(aeEventLoop *eventLoop) { |
| 423 | serverAssert(g_eventLoopThisThread == NULL || g_eventLoopThisThread == eventLoop); |
no test coverage detected