boost: drop boost threads from torcontrol

This commit is contained in:
Cory Fields 2018-02-07 18:33:20 -05:00
parent ba91724948
commit 08272671d2
3 changed files with 5 additions and 5 deletions

View file

@ -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();

View file

@ -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()

View file

@ -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();