diff options
author | antirez <antirez@gmail.com> | 2017-05-03 11:26:21 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2017-05-03 11:26:21 +0200 |
commit | 3fcf959e609e850a114d4016843e4c991066ebac (patch) | |
tree | 6ec7dc7bd6ecb0d8b36b247018ab999c5a75290e /src/ae.h | |
parent | ba4a5a3255d9a28c6aa9ead36f640705704249a7 (diff) | |
download | redis-3fcf959e609e850a114d4016843e4c991066ebac.tar.gz |
Modules TSC: Release the GIL for all the time we are blocked.
Instead of giving the module background operations just a small time to
run in the beforeSleep() function, we can have the lock released for all
the time we are blocked in the multiplexing syscall.
Diffstat (limited to 'src/ae.h')
-rw-r--r-- | src/ae.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -98,6 +98,7 @@ typedef struct aeEventLoop { int stop; void *apidata; /* This is used for polling API specific data */ aeBeforeSleepProc *beforesleep; + aeBeforeSleepProc *aftersleep; } aeEventLoop; /* Prototypes */ @@ -117,6 +118,7 @@ int aeWait(int fd, int mask, long long milliseconds); void aeMain(aeEventLoop *eventLoop); char *aeGetApiName(void); void aeSetBeforeSleepProc(aeEventLoop *eventLoop, aeBeforeSleepProc *beforesleep); +void aeSetAfterSleepProc(aeEventLoop *eventLoop, aeBeforeSleepProc *aftersleep); int aeGetSetSize(aeEventLoop *eventLoop); int aeResizeSetSize(aeEventLoop *eventLoop, int setsize); |