Skip to content

Commit 5be054d

Browse files
committed
Remove boost-thread dependency.
1 parent d4456d7 commit 5be054d

File tree

7 files changed

+5
-11
lines changed

7 files changed

+5
-11
lines changed

builds/msvc/vs2022/libbitcoin-protocol-test/libbitcoin-protocol-test.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@
147147
<Import Project="$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets')" />
148148
<Import Project="$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets')" />
149149
<Import Project="$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets')" />
150-
<Import Project="$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets')" />
151150
<Import Project="$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets" Condition="Exists('$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets')" />
152151
<Import Project="$(NuGetPackageRoot)boost_unit_test_framework-vc143.1.86.0\build\boost_unit_test_framework-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_unit_test_framework-vc143.1.86.0\build\boost_unit_test_framework-vc143.targets')" />
153152
</ImportGroup>
@@ -160,7 +159,6 @@
160159
<Error Condition="!Exists('$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets'))" />
161160
<Error Condition="!Exists('$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets'))" />
162161
<Error Condition="!Exists('$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets'))" />
163-
<Error Condition="!Exists('$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets'))" />
164162
<Error Condition="!Exists('$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets'))" />
165163
<Error Condition="!Exists('$(NuGetPackageRoot)boost_unit_test_framework-vc143.1.86.0\build\boost_unit_test_framework-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_unit_test_framework-vc143.1.86.0\build\boost_unit_test_framework-vc143.targets'))" />
166164
</Target>

builds/msvc/vs2022/libbitcoin-protocol-test/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<package id="boost_iostreams-vc143" version="1.86.0" targetFramework="Native" />
1212
<package id="boost_locale-vc143" version="1.86.0" targetFramework="Native" />
1313
<package id="boost_program_options-vc143" version="1.86.0" targetFramework="Native" />
14-
<package id="boost_thread-vc143" version="1.86.0" targetFramework="Native" />
1514
<package id="secp256k1_vc143" version="0.1.0.21" targetFramework="Native" />
1615
<package id="boost_unit_test_framework-vc143" version="1.86.0" targetFramework="Native" />
1716
</packages>

builds/msvc/vs2022/libbitcoin-protocol/libbitcoin-protocol.vcxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,6 @@
170170
<Import Project="$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets')" />
171171
<Import Project="$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets')" />
172172
<Import Project="$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets')" />
173-
<Import Project="$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets" Condition="Exists('$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets')" />
174173
<Import Project="$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets" Condition="Exists('$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets')" />
175174
</ImportGroup>
176175
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -182,7 +181,6 @@
182181
<Error Condition="!Exists('$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_iostreams-vc143.1.86.0\build\boost_iostreams-vc143.targets'))" />
183182
<Error Condition="!Exists('$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_locale-vc143.1.86.0\build\boost_locale-vc143.targets'))" />
184183
<Error Condition="!Exists('$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_program_options-vc143.1.86.0\build\boost_program_options-vc143.targets'))" />
185-
<Error Condition="!Exists('$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)boost_thread-vc143.1.86.0\build\boost_thread-vc143.targets'))" />
186184
<Error Condition="!Exists('$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)secp256k1_vc143.0.1.0.21\build\native\secp256k1_vc143.targets'))" />
187185
</Target>
188186
<ItemGroup>

builds/msvc/vs2022/libbitcoin-protocol/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@
1111
<package id="boost_iostreams-vc143" version="1.86.0" targetFramework="Native" />
1212
<package id="boost_locale-vc143" version="1.86.0" targetFramework="Native" />
1313
<package id="boost_program_options-vc143" version="1.86.0" targetFramework="Native" />
14-
<package id="boost_thread-vc143" version="1.86.0" targetFramework="Native" />
1514
<package id="secp256k1_vc143" version="0.1.0.21" targetFramework="Native" />
1615
</packages>

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)