mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
init: Setup scheduler in tests and init in exactly the same way
This commit is contained in:
@@ -1317,8 +1317,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node)
|
||||
node.scheduler = MakeUnique<CScheduler>();
|
||||
|
||||
// Start the lightweight task scheduler thread
|
||||
CScheduler::Function serviceLoop = [&node]{ node.scheduler->serviceQueue(); };
|
||||
threadGroup.create_thread(std::bind(&TraceThread<CScheduler::Function>, "scheduler", serviceLoop));
|
||||
threadGroup.create_thread([&] { TraceThread("scheduler", [&] { node.scheduler->serviceQueue(); }); });
|
||||
|
||||
// Gather some entropy once per minute.
|
||||
node.scheduler->scheduleEvery([]{
|
||||
|
||||
Reference in New Issue
Block a user