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

Function postponeClientRead

app/redis-6.2.6/src/networking.c:3683–3695  ·  view source on GitHub ↗

Return 1 if we want to handle the client read later using threaded I/O. * This is called by the readable handler of the event loop. * As a side effect of calling this function the client is put in the * pending read clients and flagged as such. */

Source from the content-addressed store, hash-verified

3681 * As a side effect of calling this function the client is put in the
3682 * pending read clients and flagged as such. */
3683int postponeClientRead(client *c) {
3684 if (server.io_threads_active &&
3685 server.io_threads_do_reads &&
3686 !ProcessingEventsWhileBlocked &&
3687 !(c->flags & (CLIENT_MASTER|CLIENT_SLAVE|CLIENT_PENDING_READ|CLIENT_BLOCKED)))
3688 {
3689 c->flags |= CLIENT_PENDING_READ;
3690 listAddNodeHead(server.clients_pending_read,c);
3691 return 1;
3692 } else {
3693 return 0;
3694 }
3695}
3696
3697/* When threaded I/O is also enabled for the reading + parsing side, the
3698 * readable handler will just put normal clients into a queue of clients to

Callers 1

readQueryFromClientFunction · 0.85

Calls 1

listAddNodeHeadFunction · 0.85

Tested by

no test coverage detected