Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
90d720e7
Commit
90d720e7
authored
Apr 29, 2019
by
antirez
Browse files
Threaded IO: put fflush() inside tio_debug conditional.
parent
6ab6a97f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
90d720e7
...
@@ -2608,7 +2608,7 @@ void initThreadedIO(void) {
...
@@ -2608,7 +2608,7 @@ void initThreadedIO(void) {
}
}
void
startThreadedIO
(
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
"
);
if
(
tio_debug
)
printf
(
"--- STARTING THREADED IO ---
\n
"
);
serverAssert
(
io_threads_active
==
0
);
serverAssert
(
io_threads_active
==
0
);
for
(
int
j
=
0
;
j
<
server
.
io_threads_num
;
j
++
)
for
(
int
j
=
0
;
j
<
server
.
io_threads_num
;
j
++
)
...
@@ -2620,7 +2620,7 @@ void stopThreadedIO(void) {
...
@@ -2620,7 +2620,7 @@ void stopThreadedIO(void) {
/* We may have still clients with pending reads when this function
/* We may have still clients with pending reads when this function
* is called: handle them before stopping the threads. */
* is called: handle them before stopping the threads. */
handleClientsWithPendingReadsUsingThreads
();
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
"
,
if
(
tio_debug
)
printf
(
"--- STOPPING THREADED IO [R%d] [W%d] ---
\n
"
,
(
int
)
listLength
(
server
.
clients_pending_read
),
(
int
)
listLength
(
server
.
clients_pending_read
),
(
int
)
listLength
(
server
.
clients_pending_write
));
(
int
)
listLength
(
server
.
clients_pending_write
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment