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. */
| 3681 | * As a side effect of calling this function the client is put in the |
| 3682 | * pending read clients and flagged as such. */ |
| 3683 | int 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 |
no test coverage detected