From 306f71b4eb4a0fd8e64f47dc008bc235b80b13d9 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Fri, 28 Feb 2020 12:02:10 +1000 Subject: scheduler: don't rely on boost interrupt on shutdown Calling interrupt_all() will immediately stop the scheduler, so it's safe to invoke stop() beforehand, and this removes the reliance on boost to interrupt serviceQueue(). --- src/init.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 14d489617..a637aac4d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -206,6 +206,7 @@ void Shutdown(NodeContext& node) // After everything has been shut down, but before things get flushed, stop the // CScheduler/checkqueue threadGroup + if (node.scheduler) node.scheduler->stop(); threadGroup.interrupt_all(); threadGroup.join_all(); -- cgit v1.2.3