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

Function wakeTimeThread

src/server.cpp:7320–7329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7318}
7319
7320void wakeTimeThread() {
7321 updateCachedTime();
7322 aeThreadOffline();
7323 std::unique_lock<fastlock> lock(time_thread_lock);
7324 aeThreadOnline();
7325 if (sleeping_threads >= cserver.cthreads)
7326 time_thread_cv.notify_one();
7327 sleeping_threads--;
7328 serverAssert(sleeping_threads >= 0);
7329}
7330
7331void *timeThreadMain(void*) {
7332 timespec delay;

Callers 1

afterSleepFunction · 0.85

Calls 3

updateCachedTimeFunction · 0.85
aeThreadOfflineFunction · 0.85
aeThreadOnlineFunction · 0.85

Tested by

no test coverage detected