mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
boost: drop boost threads from torcontrol
This commit is contained in:
parent
ba91724948
commit
08272671d2
@ -1665,7 +1665,7 @@ bool AppInitMain()
|
||||
LogPrintf("nBestHeight = %d\n", chain_active_height);
|
||||
|
||||
if (gArgs.GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION))
|
||||
StartTorControl(threadGroup, scheduler);
|
||||
StartTorControl();
|
||||
|
||||
Discover();
|
||||
|
||||
|
@ -731,7 +731,7 @@ void TorController::reconnect_cb(evutil_socket_t fd, short what, void *arg)
|
||||
|
||||
/****** Thread ********/
|
||||
static struct event_base *gBase;
|
||||
static boost::thread torControlThread;
|
||||
static std::thread torControlThread;
|
||||
|
||||
static void TorControlThread()
|
||||
{
|
||||
@ -740,7 +740,7 @@ static void TorControlThread()
|
||||
event_base_dispatch(gBase);
|
||||
}
|
||||
|
||||
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
void StartTorControl()
|
||||
{
|
||||
assert(!gBase);
|
||||
#ifdef WIN32
|
||||
@ -754,7 +754,7 @@ void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
return;
|
||||
}
|
||||
|
||||
torControlThread = boost::thread(boost::bind(&TraceThread<void (*)()>, "torcontrol", &TorControlThread));
|
||||
torControlThread = std::thread(std::bind(&TraceThread<void (*)()>, "torcontrol", &TorControlThread));
|
||||
}
|
||||
|
||||
void InterruptTorControl()
|
||||
|
@ -13,7 +13,7 @@
|
||||
extern const std::string DEFAULT_TOR_CONTROL;
|
||||
static const bool DEFAULT_LISTEN_ONION = true;
|
||||
|
||||
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler);
|
||||
void StartTorControl();
|
||||
void InterruptTorControl();
|
||||
void StopTorControl();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user