mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Create a scheduler thread for lightweight tasks
This commit is contained in:
parent
68d370bec4
commit
ddd0acd3db
4 changed files with 14 additions and 4 deletions
|
|
@ -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()");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue