Clarify a comment in clientsCron().

This commit is contained in:
antirez 2015-07-16 09:26:36 +02:00
parent 0f64080dcb
commit e0bb454a16

View File

@ -973,11 +973,11 @@ int clientsCronResizeQueryBuffer(redisClient *c) {
} }
void clientsCron(void) { void clientsCron(void) {
/* Make sure to process at least 1/(server.hz*10) of clients per call. /* Make sure to process at least numclients/(server.hz*10) of clients
* Since this function is called server.hz times per second we are sure that * per call. Since this function is called server.hz times per second
* in the worst case we process all the clients in 10 seconds. * we are sure that in the worst case we process all the clients in 10
* In normal conditions (a reasonable number of clients) we process * seconds. In normal conditions (a reasonable number of clients) we
* all the clients in a shorter time. */ * process all the clients in a shorter time. */
int numclients = listLength(server.clients); int numclients = listLength(server.clients);
int iterations = numclients/(server.hz*10); int iterations = numclients/(server.hz*10);