mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-12 13:43:43 +01:00
net: make net interruptible
Also now that net threads are interruptible, switch them to use std threads/binds/mutexes/condvars.
This commit is contained in:
@@ -176,6 +176,8 @@ void Interrupt(boost::thread_group& threadGroup)
|
||||
InterruptRPC();
|
||||
InterruptREST();
|
||||
InterruptTorControl();
|
||||
if (g_connman)
|
||||
g_connman->Interrupt();
|
||||
threadGroup.interrupt_all();
|
||||
}
|
||||
|
||||
@@ -1572,7 +1574,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe;
|
||||
connOptions.nMaxOutboundLimit = nMaxOutboundLimit;
|
||||
|
||||
if(!connman.Start(threadGroup, scheduler, strNodeError, connOptions))
|
||||
if (!connman.Start(scheduler, strNodeError, connOptions))
|
||||
return InitError(strNodeError);
|
||||
|
||||
// ********************************************************* Step 12: finished
|
||||
|
||||
Reference in New Issue
Block a user