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

Method AddWorkFunction

src/AsyncWorkQueue.cpp:123–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void AsyncWorkQueue::AddWorkFunction(std::function<void()> &&fnAsync, bool fHiPri)
124{
125 std::unique_lock<std::mutex> lock(m_mutex);
126 if (fHiPri)
127 m_workqueue.emplace_front(std::move(fnAsync));
128 else
129 m_workqueue.emplace_back(std::move(fnAsync));
130 m_cvWakeup.notify_one();
131}

Callers 11

keysCommandFunction · 0.80
processChangesAsyncMethod · 0.80
removeAllCachedValuesMethod · 0.80
clearAsyncMethod · 0.80
emergencyFreeCacheMethod · 0.80
flushQueuedKeysMethod · 0.80
flushStorageWeakFunction · 0.80
serverCronFunction · 0.80
beforeSleepFunction · 0.80
asyncCommandMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected