|
|
@ -19,6 +19,7 @@ |
|
|
|
#include "net.h" |
|
|
|
#include "net.h" |
|
|
|
#include "rpcserver.h" |
|
|
|
#include "rpcserver.h" |
|
|
|
#include "script/standard.h" |
|
|
|
#include "script/standard.h" |
|
|
|
|
|
|
|
#include "scheduler.h" |
|
|
|
#include "txdb.h" |
|
|
|
#include "txdb.h" |
|
|
|
#include "ui_interface.h" |
|
|
|
#include "ui_interface.h" |
|
|
|
#include "util.h" |
|
|
|
#include "util.h" |
|
|
@ -564,7 +565,7 @@ bool InitSanityCheck(void) |
|
|
|
/** Initialize bitcoin.
|
|
|
|
/** Initialize bitcoin.
|
|
|
|
* @pre Parameters should be parsed and config file should be read. |
|
|
|
* @pre Parameters should be parsed and config file should be read. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
bool AppInit2(boost::thread_group& threadGroup) |
|
|
|
bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// ********************************************************* Step 1: setup
|
|
|
|
// ********************************************************* Step 1: setup
|
|
|
|
#ifdef _MSC_VER |
|
|
|
#ifdef _MSC_VER |
|
|
@ -890,6 +891,10 @@ bool AppInit2(boost::thread_group& threadGroup) |
|
|
|
threadGroup.create_thread(&ThreadScriptCheck); |
|
|
|
threadGroup.create_thread(&ThreadScriptCheck); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Start the lightweight task scheduler thread
|
|
|
|
|
|
|
|
CScheduler::Function serviceLoop = boost::bind(&CScheduler::serviceQueue, &scheduler); |
|
|
|
|
|
|
|
threadGroup.create_thread(boost::bind(&TraceThread<CScheduler::Function>, "scheduler", serviceLoop)); |
|
|
|
|
|
|
|
|
|
|
|
/* Start the RPC server already. It will be started in "warmup" mode
|
|
|
|
/* Start the RPC server already. It will be started in "warmup" mode
|
|
|
|
* and not really process calls already (but it will signify connections |
|
|
|
* and not really process calls already (but it will signify connections |
|
|
|
* that the server is there and will be ready later). Warmup mode will |
|
|
|
* that the server is there and will be ready later). Warmup mode will |
|
|
|