mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Create a scheduler thread for lightweight tasks
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "init.h"
|
||||
#include "main.h"
|
||||
#include "noui.h"
|
||||
#include "scheduler.h"
|
||||
#include "util.h"
|
||||
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
@@ -55,6 +56,7 @@ void WaitForShutdown(boost::thread_group* threadGroup)
|
||||
bool AppInit(int argc, char* argv[])
|
||||
{
|
||||
boost::thread_group threadGroup;
|
||||
CScheduler scheduler;
|
||||
|
||||
bool fRet = false;
|
||||
|
||||
@@ -142,7 +144,7 @@ bool AppInit(int argc, char* argv[])
|
||||
#endif
|
||||
SoftSetBoolArg("-server", true);
|
||||
|
||||
fRet = AppInit2(threadGroup);
|
||||
fRet = AppInit2(threadGroup, scheduler);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
PrintExceptionContinue(&e, "AppInit()");
|
||||
|
||||
Reference in New Issue
Block a user