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

Function DetectShutdownThread

src/tests/systestbase.cpp:9–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include "systestbase.h"
8
9void DetectShutdownThread(boost::thread_group *threadGroup) {
10 bool fShutdown = ShutdownRequested();
11 // Tell the main threads to shutdown.
12 while (!fShutdown) {
13 MilliSleep(200);
14 fShutdown = ShutdownRequested();
15 }
16 Interrupt();
17
18 if (threadGroup) {
19 threadGroup->interrupt_all();
20 threadGroup->join_all();
21 }
22}
23
24bool PrintTestNotSetPara() {
25 bool flag = false;

Callers

nothing calls this directly

Calls 3

ShutdownRequestedFunction · 0.85
MilliSleepFunction · 0.85
InterruptFunction · 0.85

Tested by

no test coverage detected