Modules TSC: GIL and cooperative multi tasking setup.

This commit is contained in:
antirez
2017-04-28 18:41:10 +02:00
parent 5021fda2b9
commit 74f3a84390
3 changed files with 31 additions and 1 deletions

View File

@ -1172,6 +1172,9 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
void beforeSleep(struct aeEventLoop *eventLoop) {
UNUSED(eventLoop);
/* Give some run time to modules threads using thread safe contexts. */
moduleCooperativeMultiTaskingCycle();
/* Call the Redis Cluster before sleep function. Note that this function
* may change the state of Redis Cluster (from ok to fail or vice versa),
* so it's a good idea to call it before serving the unblocked clients