wait for mining threads to fully exit before stopping
This commit is contained in:
@@ -1986,6 +1986,8 @@ void static BitcoinMiner()
|
|||||||
if (minerThreads != NULL)
|
if (minerThreads != NULL)
|
||||||
{
|
{
|
||||||
minerThreads->interrupt_all();
|
minerThreads->interrupt_all();
|
||||||
|
// Wait for all miner threads to fully terminate before destroying shared resources
|
||||||
|
minerThreads->join_all();
|
||||||
delete minerThreads;
|
delete minerThreads;
|
||||||
minerThreads = NULL;
|
minerThreads = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user