Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoind.cpp
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
* MIT license. | * MIT license. | ||||
* | * | ||||
* \section Navigation | * \section Navigation | ||||
* Use the buttons <code>Namespaces</code>, <code>Classes</code> or | * Use the buttons <code>Namespaces</code>, <code>Classes</code> or | ||||
* <code>Files</code> at the top of the page to start navigating the code. | * <code>Files</code> at the top of the page to start navigating the code. | ||||
*/ | */ | ||||
void WaitForShutdown(boost::thread_group *threadGroup) { | void WaitForShutdown(boost::thread_group *threadGroup) { | ||||
bool fShutdown = ShutdownRequested(); | while (!ShutdownRequested()) { | ||||
// Tell the main threads to shutdown. | |||||
while (!fShutdown) { | |||||
MilliSleep(200); | MilliSleep(200); | ||||
fShutdown = ShutdownRequested(); | |||||
} | } | ||||
if (threadGroup) { | if (threadGroup) { | ||||
Interrupt(*threadGroup); | Interrupt(*threadGroup); | ||||
threadGroup->join_all(); | threadGroup->join_all(); | ||||
} | } | ||||
} | } | ||||
////////////////////////////////////////////////////////////////////////////// | ////////////////////////////////////////////////////////////////////////////// | ||||
▲ Show 20 Lines • Show All 148 Lines • Show Last 20 Lines |