MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / processClients

Function processClients

src/networking.cpp:2787–2806  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2785}
2786
2787void processClients()
2788{
2789 serverAssert(GlobalLocksAcquired());
2790
2791 // Note that this function is reentrant and vecclients may be modified by code called from processInputBuffer
2792 while (!serverTL->vecclientsProcess.empty()) {
2793 client *c = serverTL->vecclientsProcess.front();
2794 serverTL->vecclientsProcess.erase(serverTL->vecclientsProcess.begin());
2795
2796 /* There is more data in the client input buffer, continue parsing it
2797 * in case to check if there is a full command to execute. */
2798 std::unique_lock<fastlock> ul(c->lock);
2799 processInputBuffer(c, false /*fParse*/, CMD_CALL_FULL);
2800 }
2801
2802 if (listLength(serverTL->clients_pending_asyncwrite))
2803 {
2804 ProcessPendingAsyncWrites();
2805 }
2806}
2807
2808void getClientsMaxBuffers(unsigned long *longest_output_list,
2809 unsigned long *biggest_input_buffer) {

Callers

nothing calls this directly

Calls 6

GlobalLocksAcquiredFunction · 0.85
processInputBufferFunction · 0.85
emptyMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected