From fa4ea997b4da1ae0afafba223fff9efbeefaf555 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 20 May 2020 11:34:31 -0400 Subject: init: Setup scheduler in tests and init in exactly the same way --- src/init.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 025ae0652..786e03262 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1317,8 +1317,7 @@ bool AppInitMain(const util::Ref& context, NodeContext& node) node.scheduler = MakeUnique(); // Start the lightweight task scheduler thread - CScheduler::Function serviceLoop = [&node]{ node.scheduler->serviceQueue(); }; - threadGroup.create_thread(std::bind(&TraceThread, "scheduler", serviceLoop)); + threadGroup.create_thread([&] { TraceThread("scheduler", [&] { node.scheduler->serviceQueue(); }); }); // Gather some entropy once per minute. node.scheduler->scheduleEvery([]{ -- cgit v1.2.3