diff --git a/src/server.cpp b/src/server.cpp index 4d10b478f..f7b7dba3f 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2146,8 +2146,10 @@ void beforeSleepLite(struct aeEventLoop *eventLoop) /* Handle writes with pending output buffers. */ handleClientsWithPendingWrites(iel); + aeAcquireLock(); /* Close clients that need to be closed asynchronous */ freeClientsInAsyncFreeQueue(iel); + aeReleaseLock(); /* Before we are going to sleep, let the threads access the dataset by * releasing the GIL. Redis main thread will not touch anything at this diff --git a/src/server.h b/src/server.h index f315bdcd8..e2b0fd089 100644 --- a/src/server.h +++ b/src/server.h @@ -151,8 +151,6 @@ public: #define CONFIG_DEFAULT_TCP_BACKLOG 511 /* TCP listen backlog. */ #define CONFIG_DEFAULT_CLIENT_TIMEOUT 0 /* Default client timeout: infinite */ #define CONFIG_DEFAULT_DBNUM 16 -#define CONFIG_DEFAULT_IO_THREADS_NUM 1 /* Single threaded by default */ -#define CONFIG_DEFAULT_IO_THREADS_DO_READS 0 /* Read + parse from threads? */ #define CONFIG_MAX_LINE 1024 #define CRON_DBS_PER_CALL 16 #define NET_MAX_WRITES_PER_EVENT (1024*64) @@ -1765,7 +1763,6 @@ int writeToClient(int fd, client *c, int handler_installed); void linkClient(client *c); void protectClient(client *c); void unprotectClient(client *c); -void initThreadedIO(void); // Special Thread-safe addReply() commands for posting messages to clients from a different thread void addReplyAsync(client *c, robj_roptr obj);