now acquire and release GIL every time you go to/wake from sleep
Former-commit-id: a6bc34c09b58f8c87da1611cd89638245d428a96
This commit is contained in:
parent
cb43eda420
commit
662d5faa8b
@ -2401,7 +2401,7 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
|
||||
locker.disarm();
|
||||
if (!fSentReplies)
|
||||
handleClientsWithPendingWrites(iel, aof_state);
|
||||
if (moduleCount()) moduleReleaseGIL(TRUE /*fServerThread*/);
|
||||
moduleReleaseGIL(TRUE /*fServerThread*/);
|
||||
|
||||
/* Do NOT add anything below moduleReleaseGIL !!! */
|
||||
}
|
||||
@ -2414,7 +2414,7 @@ void afterSleep(struct aeEventLoop *eventLoop) {
|
||||
/* Do NOT add anything above moduleAcquireGIL !!! */
|
||||
|
||||
/* Aquire the modules GIL so that their threads won't touch anything. */
|
||||
if (moduleCount()) moduleAcquireGIL(TRUE /*fServerThread*/);
|
||||
moduleAcquireGIL(TRUE /*fServerThread*/);
|
||||
}
|
||||
|
||||
/* =========================== Server initialization ======================== */
|
||||
|
Loading…
x
Reference in New Issue
Block a user