Module: API to block clients with threading support.

Just a draft to align the main ideas, never executed code. Compiles.
This commit is contained in:
antirez
2016-10-07 11:55:35 +02:00
parent a5998d1fda
commit 8fadfe52a2
4 changed files with 187 additions and 13 deletions

View File

@ -1195,6 +1195,10 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
if (listLength(server.clients_waiting_acks))
processClientsWaitingReplicas();
/* Check if there are clients unblocked by modules that implement
* blocking commands. */
moduleHandleBlockedClients();
/* Try to process pending commands for clients that were just unblocked. */
if (listLength(server.unblocked_clients))
processUnblockedClients();