Changeset View
Changeset View
Standalone View
Standalone View
src/init.cpp
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | |||||
// | // | ||||
// Thread management and startup/shutdown: | // Thread management and startup/shutdown: | ||||
// | // | ||||
// The network-processing threads are all part of a thread group created by | // The network-processing threads are all part of a thread group created by | ||||
// AppInit() or the Qt main() function. | // AppInit() or the Qt main() function. | ||||
// | // | ||||
// A clean exit happens when StartShutdown() or the SIGTERM signal handler sets | // A clean exit happens when StartShutdown() or the SIGTERM signal handler sets | ||||
// ShutdownRequested(), which triggers the DetectShutdownThread(), which | // fRequestShutdown, which makes main thread's WaitForShutdown() interrupts the | ||||
// interrupts the main thread group. DetectShutdownThread() then exits, which | // thread group. | ||||
// causes AppInit() to continue (it .joins the shutdown thread). Shutdown() is | // And then, WaitForShutdown() makes all other on-going threads in the thread | ||||
// then called to clean up database connections, and stop other threads that | // group join the main thread. | ||||
// should only be stopped after the main network-processing threads have exited. | // Shutdown() is then called to clean up database connections, and stop other | ||||
// threads that should only be stopped after the main network-processing threads | |||||
// have exited. | |||||
// | // | ||||
// Shutdown for Qt is very similar, only it uses a QTimer to detect | // Shutdown for Qt is very similar, only it uses a QTimer to detect | ||||
// ShutdownRequested() getting set, and then does the normal Qt shutdown thing. | // ShutdownRequested() getting set, and then does the normal Qt shutdown thing. | ||||
// | // | ||||
static std::unique_ptr<CCoinsViewErrorCatcher> pcoinscatcher; | static std::unique_ptr<CCoinsViewErrorCatcher> pcoinscatcher; | ||||
static std::unique_ptr<ECCVerifyHandle> globalVerifyHandle; | static std::unique_ptr<ECCVerifyHandle> globalVerifyHandle; | ||||
▲ Show 20 Lines • Show All 2,652 Lines • Show Last 20 Lines |