MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / DetectShutdownThread

Function DetectShutdownThread

src/coind.cpp:34–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32static bool fDaemon = false;
33
34void DetectShutdownThread(boost::thread_group* threadGroup) {
35 RenameThread("coin-waitexit");
36 bool fShutdown = ShutdownRequested();
37 // Tell the main threads to shutdown.
38 while (!fShutdown) {
39 MilliSleep(200);
40 fShutdown = ShutdownRequested();
41 }
42 if (threadGroup) {
43 threadGroup->interrupt_all();
44 threadGroup->join_all();
45 }
46
47 Interrupt();
48}
49
50//////////////////////////////////////////////////////////////////////////////
51//

Callers

nothing calls this directly

Calls 4

RenameThreadFunction · 0.85
ShutdownRequestedFunction · 0.85
MilliSleepFunction · 0.85
InterruptFunction · 0.85

Tested by

no test coverage detected