Threaded IO: stop threads when no longer needed + C11 in Makefile.

Now threads are stopped even when the connections drop immediately to
zero, not allowing the networking code to detect the condition and stop
the threads. serverCron() will handle that.
This commit is contained in:
Ubuntu
2019-03-25 17:05:06 +00:00
committed by antirez
parent ea35a81c42
commit 9bf7f302a7
4 changed files with 29 additions and 6 deletions

View File

@ -2001,6 +2001,9 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
migrateCloseTimedoutSockets();
}
/* Stop the I/O threads if we don't have enough pending work. */
stopThreadedIOIfNeeded();
/* Start a scheduled BGSAVE if the corresponding flag is set. This is
* useful when we are forced to postpone a BGSAVE because an AOF
* rewrite is in progress.