MCPcopy Create free account
hub / github.com/F-Stack/f-stack / queueClientForReprocessing

Function queueClientForReprocessing

app/redis-6.2.6/src/blocked.c:168–175  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

166 * process it for queries ready to be executed at a safe time.
167 */
168void 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. */

Callers 2

evalGenericCommandFunction · 0.85
unblockClientFunction · 0.85

Calls 1

listAddNodeTailFunction · 0.85

Tested by

no test coverage detected