Reverse list of clients with pending writes.

May potentially improve locality... not exactly clear if this makes a
difference or not. But for sure is harmless.
This commit is contained in:
antirez 2015-09-28 23:25:52 +02:00
parent 063ecbd5e5
commit 825f65d2bd

View File

@ -177,7 +177,7 @@ int prepareClientToWrite(client *c) {
* a system call. We'll only really install the write handler if
* we'll not be able to write the whole reply at once. */
c->flags |= CLIENT_PENDING_WRITE;
listAddNodeTail(server.clients_pending_write,c);
listAddNodeHead(server.clients_pending_write,c);
}
/* Authorize the caller to queue in the output buffer of this client. */