This function is called immediately after the event loop multiplexing * API returned, and the control is going to soon return to Redis by invoking * the different events callbacks. */
| 3042 | * API returned, and the control is going to soon return to Redis by invoking |
| 3043 | * the different events callbacks. */ |
| 3044 | void afterSleep(struct aeEventLoop *eventLoop) { |
| 3045 | UNUSED(eventLoop); |
| 3046 | /* Do NOT add anything above moduleAcquireGIL !!! */ |
| 3047 | |
| 3048 | /* Aquire the modules GIL so that their threads won't touch anything. |
| 3049 | Don't check here that modules are enabled, rather use the result from beforeSleep |
| 3050 | Otherwise you may double acquire the GIL and cause deadlocks in the module */ |
| 3051 | if (!ProcessingEventsWhileBlocked) { |
| 3052 | if (serverTL->modulesEnabledThisAeLoop) moduleAcquireGIL(TRUE /*fServerThread*/); |
| 3053 | aeThreadOnline(); |
| 3054 | wakeTimeThread(); |
| 3055 | |
| 3056 | serverAssert(serverTL->gcEpoch.isReset()); |
| 3057 | serverTL->gcEpoch = g_pserver->garbageCollector.startEpoch(); |
| 3058 | |
| 3059 | aeAcquireLock(); |
| 3060 | for (int idb = 0; idb < cserver.dbnum; ++idb) |
| 3061 | g_pserver->db[idb]->trackChanges(false); |
| 3062 | aeReleaseLock(); |
| 3063 | |
| 3064 | serverTL->disable_async_commands = false; |
| 3065 | } |
| 3066 | } |
| 3067 | |
| 3068 | /* =========================== Server initialization ======================== */ |
| 3069 |
nothing calls this directly
no test coverage detected