summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-04-29 12:46:23 +0200
committerantirez <antirez@gmail.com>2019-05-06 18:02:51 +0200
commit90d720e7a5777ec34c93258d97592d8c6b439988 (patch)
treeaca9b9f03c273dbb0e6559cf2fb17037f0fcac02
parent6ab6a97fe6991d1496a3c8efa52280db3a3df3eb (diff)
downloadredis-90d720e7a5777ec34c93258d97592d8c6b439988.tar.gz
Threaded IO: put fflush() inside tio_debug conditional.
-rw-r--r--src/networking.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/networking.c b/src/networking.c
index 4361ab1af..74bd0f13d 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -2608,7 +2608,7 @@ void initThreadedIO(void) {
}
void startThreadedIO(void) {
- if (tio_debug) printf("S"); fflush(stdout);
+ if (tio_debug) { printf("S"); fflush(stdout); }
if (tio_debug) printf("--- STARTING THREADED IO ---\n");
serverAssert(io_threads_active == 0);
for (int j = 0; j < server.io_threads_num; j++)
@@ -2620,7 +2620,7 @@ void stopThreadedIO(void) {
/* We may have still clients with pending reads when this function
* is called: handle them before stopping the threads. */
handleClientsWithPendingReadsUsingThreads();
- if (tio_debug) printf("E"); fflush(stdout);
+ if (tio_debug) { printf("E"); fflush(stdout); }
if (tio_debug) printf("--- STOPPING THREADED IO [R%d] [W%d] ---\n",
(int) listLength(server.clients_pending_read),
(int) listLength(server.clients_pending_write));