boost: drop boost threads from torcontrol
This commit is contained in:
parent
ba91724948
commit
08272671d2
3 changed files with 5 additions and 5 deletions
|
@ -1665,7 +1665,7 @@ bool AppInitMain()
|
||||||
LogPrintf("nBestHeight = %d\n", chain_active_height);
|
LogPrintf("nBestHeight = %d\n", chain_active_height);
|
||||||
|
|
||||||
if (gArgs.GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION))
|
if (gArgs.GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION))
|
||||||
StartTorControl(threadGroup, scheduler);
|
StartTorControl();
|
||||||
|
|
||||||
Discover();
|
Discover();
|
||||||
|
|
||||||
|
|
|
@ -731,7 +731,7 @@ void TorController::reconnect_cb(evutil_socket_t fd, short what, void *arg)
|
||||||
|
|
||||||
/****** Thread ********/
|
/****** Thread ********/
|
||||||
static struct event_base *gBase;
|
static struct event_base *gBase;
|
||||||
static boost::thread torControlThread;
|
static std::thread torControlThread;
|
||||||
|
|
||||||
static void TorControlThread()
|
static void TorControlThread()
|
||||||
{
|
{
|
||||||
|
@ -740,7 +740,7 @@ static void TorControlThread()
|
||||||
event_base_dispatch(gBase);
|
event_base_dispatch(gBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler)
|
void StartTorControl()
|
||||||
{
|
{
|
||||||
assert(!gBase);
|
assert(!gBase);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -754,7 +754,7 @@ void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
torControlThread = boost::thread(boost::bind(&TraceThread<void (*)()>, "torcontrol", &TorControlThread));
|
torControlThread = std::thread(std::bind(&TraceThread<void (*)()>, "torcontrol", &TorControlThread));
|
||||||
}
|
}
|
||||||
|
|
||||||
void InterruptTorControl()
|
void InterruptTorControl()
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
extern const std::string DEFAULT_TOR_CONTROL;
|
extern const std::string DEFAULT_TOR_CONTROL;
|
||||||
static const bool DEFAULT_LISTEN_ONION = true;
|
static const bool DEFAULT_LISTEN_ONION = true;
|
||||||
|
|
||||||
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler);
|
void StartTorControl();
|
||||||
void InterruptTorControl();
|
void InterruptTorControl();
|
||||||
void StopTorControl();
|
void StopTorControl();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue