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
9cc7038e
Commit
9cc7038e
authored
Mar 16, 2020
by
zhaozhao.zz
Committed by
antirez
Mar 25, 2020
Browse files
Threaded IO: handle pending reads clients ASAP after event loop
parent
da8c7c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
9cc7038e
...
...
@@ -2088,6 +2088,9 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
void
beforeSleep
(
struct
aeEventLoop
*
eventLoop
)
{
UNUSED
(
eventLoop
);
/* We should handle pending reads clients ASAP after event loop. */
handleClientsWithPendingReadsUsingThreads
();
/* Handle TLS pending data. (must be done before flushAppendOnlyFile) */
tlsProcessPendingData
();
/* If tls still has pending unread data don't sleep at all. */
...
...
@@ -2157,7 +2160,6 @@ void beforeSleep(struct aeEventLoop *eventLoop) {
void
afterSleep
(
struct
aeEventLoop
*
eventLoop
)
{
UNUSED
(
eventLoop
);
if
(
moduleCount
())
moduleAcquireGIL
();
handleClientsWithPendingReadsUsingThreads
();
}
/* =========================== Server initialization ======================== */
...
...
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