Move scheduler/threadGroup into common-init instead of per-app

This resolves #12229 which pointed out a shutdown deadlock due to
scheduler/checkqueue having been shut down while network message
processing is still running.
This commit is contained in:
Matt Corallo
2018-01-24 21:15:56 -05:00
parent 6970b30c6f
commit 082a61c69d
4 changed files with 22 additions and 27 deletions

View File

@@ -19,7 +19,7 @@ class thread_group;
void StartShutdown();
bool ShutdownRequested();
/** Interrupt threads */
void Interrupt(boost::thread_group& threadGroup);
void Interrupt();
void Shutdown();
//!Initialize the logging infrastructure
void InitLogging();
@@ -54,7 +54,7 @@ bool AppInitLockDataDirectory();
* @note This should only be done after daemonization. Call Shutdown() if this function fails.
* @pre Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called.
*/
bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler);
bool AppInitMain();
/** The help message mode determines what help message to show */
enum HelpMessageMode {