Skip to content

Commit 0827267

Browse files
committed
boost: drop boost threads from torcontrol
1 parent ba91724 commit 0827267

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ bool AppInitMain()
16651665
LogPrintf("nBestHeight = %d\n", chain_active_height);
16661666

16671667
if (gArgs.GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION))
1668-
StartTorControl(threadGroup, scheduler);
1668+
StartTorControl();
16691669

16701670
Discover();
16711671

src/torcontrol.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ void TorController::reconnect_cb(evutil_socket_t fd, short what, void *arg)
731731

732732
/****** Thread ********/
733733
static struct event_base *gBase;
734-
static boost::thread torControlThread;
734+
static std::thread torControlThread;
735735

736736
static void TorControlThread()
737737
{
@@ -740,7 +740,7 @@ static void TorControlThread()
740740
event_base_dispatch(gBase);
741741
}
742742

743-
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler)
743+
void StartTorControl()
744744
{
745745
assert(!gBase);
746746
#ifdef WIN32
@@ -754,7 +754,7 @@ void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler)
754754
return;
755755
}
756756

757-
torControlThread = boost::thread(boost::bind(&TraceThread<void (*)()>, "torcontrol", &TorControlThread));
757+
torControlThread = std::thread(std::bind(&TraceThread<void (*)()>, "torcontrol", &TorControlThread));
758758
}
759759

760760
void InterruptTorControl()

src/torcontrol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
extern const std::string DEFAULT_TOR_CONTROL;
1414
static const bool DEFAULT_LISTEN_ONION = true;
1515

16-
void StartTorControl(boost::thread_group& threadGroup, CScheduler& scheduler);
16+
void StartTorControl();
1717
void InterruptTorControl();
1818
void StopTorControl();
1919

0 commit comments

Comments
 (0)