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
e0bb454a
Commit
e0bb454a
authored
Jul 16, 2015
by
antirez
Browse files
Clarify a comment in clientsCron().
parent
0f64080d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
e0bb454a
...
@@ -973,11 +973,11 @@ int clientsCronResizeQueryBuffer(redisClient *c) {
...
@@ -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
);
...
...
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