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:
Anthony Towns
2020-02-28 12:02:10 +10:00
parent 97aadf98d0
commit 306f71b4eb
3 changed files with 4 additions and 0 deletions

View File

@@ -140,6 +140,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
TestingSetup::~TestingSetup()
{
if (m_node.scheduler) m_node.scheduler->stop();
threadGroup.interrupt_all();
threadGroup.join_all();
GetMainSignals().FlushBackgroundCallbacks();