This function will schedule the client for reprocessing at a safe time. * * This is useful when a client was blocked for some reason (blocking operation, * CLIENT PAUSE, or whatever), because it may end with some accumulated query * buffer that needs to be processed ASAP: * * 1. When a client is blocked, its readable handler is still active. * 2. However in this case it only gets data into
| 166 | * process it for queries ready to be executed at a safe time. |
| 167 | */ |
| 168 | void queueClientForReprocessing(client *c) { |
| 169 | /* The client may already be into the unblocked list because of a previous |
| 170 | * blocking operation, don't add back it into the list multiple times. */ |
| 171 | if (!(c->flags & CLIENT_UNBLOCKED)) { |
| 172 | c->flags |= CLIENT_UNBLOCKED; |
| 173 | listAddNodeTail(server.unblocked_clients,c); |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | /* Unblock a client calling the right function depending on the kind |
| 178 | * of operation the client is blocking for. */ |
no test coverage detected