Skip to content

Commit 9d2399c

Browse files
committed
Use std::thread.
1 parent 23b07a1 commit 9d2399c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

include/bitcoin/protocol/boost.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
#include <boost/asio.hpp>
2323
#include <boost/format.hpp>
2424
#include <boost/regex.hpp>
25-
#include <boost/thread.hpp>
2625

2726
namespace libbitcoin {
2827
namespace protocol {
29-
30-
typedef boost::thread thread;
28+
3129
typedef boost::asio::ip::address ip;
3230
typedef boost::asio::ip::address_v4 ipv4;
3331
typedef boost::asio::ip::address_v6 ipv6;

include/bitcoin/protocol/zmq/worker.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <memory>
2424
#include <future>
2525
#include <shared_mutex>
26+
#include <thread>
2627
#include <bitcoin/system.hpp>
2728
#include <bitcoin/protocol/boost.hpp>
2829
#include <bitcoin/protocol/define.hpp>
@@ -67,7 +68,7 @@ class BCP_API worker
6768
std::atomic<bool> stopped_;
6869
std::promise<bool> started_;
6970
std::promise<bool> finished_;
70-
std::shared_ptr<thread> thread_;
71+
std::shared_ptr<std::thread> thread_;
7172
const thread_priority priority_;
7273
mutable std::shared_mutex mutex_;
7374
};

src/zmq/worker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <future>
2222
#include <mutex>
23+
#include <thread>
2324
#include <bitcoin/system.hpp>
2425
#include <bitcoin/protocol/boost.hpp>
2526
#include <bitcoin/protocol/zmq/message.hpp>
@@ -56,7 +57,7 @@ bool worker::start() NOEXCEPT
5657
stopped_ = false;
5758

5859
// Create the worker thread and socket and start polling.
59-
thread_ = std::make_shared<thread>(&worker::work, this);
60+
thread_ = std::make_shared<std::thread>(&worker::work, this);
6061

6162
// Wait on worker start.
6263
const auto result = started_.get_future().get();

0 commit comments

Comments
 (0)