summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-04-30 15:59:23 +0200
committerantirez <antirez@gmail.com>2019-05-06 18:02:51 +0200
commit3d053dbb6dea51d59709913e9c0e9f96cc1d24f8 (patch)
treeec2225557f896eddee2bc012c75d7cba93240eb0
parent5baeb14cf3ca8eb345a7a7352bf482542168728e (diff)
downloadredis-3d053dbb6dea51d59709913e9c0e9f96cc1d24f8.tar.gz
Threaded IO: handleClientsWithPendingReadsUsingThreads top comment.
-rw-r--r--src/networking.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 651dbdb8a..6fec97605 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -2734,6 +2734,12 @@ int postponeClientRead(client *c) {
}
}
+/* When threaded I/O is also enabled for the reading + parsing side, the
+ * readable handler will just put normal clients into a queue of clients to
+ * process (instead of serving them synchronously). This function runs
+ * the queue using the I/O threads, and process them in order to accumulate
+ * the reads in the buffers, and also parse the first command available
+ * rendering it in the client structures. */
int handleClientsWithPendingReadsUsingThreads(void) {
if (!io_threads_active || !server.io_threads_do_reads) return 0;
int processed = listLength(server.clients_pending_read);