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

Method removeClientAsyncWrites

src/AsyncWorkQueue.cpp:64–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64bool AsyncWorkQueue::removeClientAsyncWrites(client *c)
65{
66 bool fFound = false;
67 aeAcquireLock();
68 m_mutex.lock();
69 for (auto pvars : m_vecpthreadVars)
70 {
71 listIter li;
72 listNode *ln;
73 listRewind(pvars->clients_pending_asyncwrite, &li);
74 while ((ln = listNext(&li)) != nullptr)
75 {
76 if (c == listNodeValue(ln))
77 {
78 listDelNode(pvars->clients_pending_asyncwrite, ln);
79 fFound = true;
80 }
81 }
82 }
83 m_mutex.unlock();
84 aeReleaseLock();
85 return fFound;
86}
87
88void AsyncWorkQueue::shutdown()
89{

Callers 1

unlinkClientFunction · 0.80

Calls 7

aeAcquireLockFunction · 0.85
listRewindFunction · 0.85
listNextFunction · 0.85
listDelNodeFunction · 0.85
aeReleaseLockFunction · 0.85
lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected