Create a scheduler thread for lightweight tasks

This commit is contained in:
Gavin Andresen 2015-04-03 11:50:06 -04:00
parent 68d370bec4
commit ddd0acd3db
No known key found for this signature in database
GPG key ID: 7588242FBE38D3A8
4 changed files with 14 additions and 4 deletions

View file

@ -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()");