MCPcopy Create free account
hub / github.com/ElementsProject/elements / WaitForShutdown

Function WaitForShutdown

src/shutdown.cpp:92–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92void WaitForShutdown()
93{
94#ifdef WIN32
95 std::unique_lock<std::mutex> lk(g_shutdown_mutex);
96 g_shutdown_cv.wait(lk, [] { return fRequestShutdown.load(); });
97#else
98 int res = g_shutdown_r.TokenRead();
99 if (res != 'x') {
100 LogPrintf("Reading shutdown token failed\n");
101 assert(0);
102 }
103#endif
104}

Callers 2

AbortShutdownFunction · 0.85
AppInitFunction · 0.85

Calls 3

waitMethod · 0.80
TokenReadMethod · 0.80
loadMethod · 0.45

Tested by

no test coverage detected