| 90 | } |
| 91 | |
| 92 | void 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 | } |
no test coverage detected