mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Make CCheckQueue destructor stop worker threads
This commit is contained in:
@@ -268,10 +268,9 @@ void Shutdown(NodeContext& node)
|
||||
StopTorControl();
|
||||
|
||||
// After everything has been shut down, but before things get flushed, stop the
|
||||
// CScheduler/checkqueue, scheduler and load block thread.
|
||||
// scheduler and load block thread.
|
||||
if (node.scheduler) node.scheduler->stop();
|
||||
if (node.chainman && node.chainman->m_thread_load.joinable()) node.chainman->m_thread_load.join();
|
||||
if (node.chainman) node.chainman->StopScriptCheckWorkerThreads();
|
||||
|
||||
// After the threads that potentially access these pointers have been stopped,
|
||||
// destruct and reset all to nullptr.
|
||||
|
||||
Reference in New Issue
Block a user