mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
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().
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user