diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:26:09 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-02-21 11:26:09 +0200 |
commit | 88c752b476fa49e963069011889929e253fb5446 (patch) | |
tree | 25bab9472dfec394ef64def8d11cf705c965d3e2 /tests/net_load_tests/clt.cpp | |
parent | Merge pull request #1716 (diff) | |
parent | switch to boost::thread for mingw build (diff) | |
download | monero-88c752b476fa49e963069011889929e253fb5446.tar.xz |
Merge pull request #1721
2cde2c02 switch to boost::thread for mingw build (Lee Clagett)
Diffstat (limited to 'tests/net_load_tests/clt.cpp')
-rw-r--r-- | tests/net_load_tests/clt.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/net_load_tests/clt.cpp b/tests/net_load_tests/clt.cpp index 39e8794b1..90f0014a5 100644 --- a/tests/net_load_tests/clt.cpp +++ b/tests/net_load_tests/clt.cpp @@ -32,7 +32,7 @@ #include <chrono> #include <functional> #include <numeric> -#include <thread> +#include <boost/thread/thread.hpp> #include <vector> #include "gtest/gtest.h" @@ -191,7 +191,7 @@ namespace protected: virtual void SetUp() { - m_thread_count = (std::max)(min_thread_count, std::thread::hardware_concurrency() / 2); + m_thread_count = (std::max)(min_thread_count, boost::thread::hardware_concurrency() / 2); m_tcp_server.get_config_object().m_pcommands_handler = &m_commands_handler; m_tcp_server.get_config_object().m_invoke_timeout = CONNECTION_TIMEOUT; @@ -278,10 +278,10 @@ namespace void parallel_exec(const Func& func) { unit_test::call_counter properly_finished_threads; - std::vector<std::thread> threads(m_thread_count); + std::vector<boost::thread> threads(m_thread_count); for (size_t i = 0; i < threads.size(); ++i) { - threads[i] = std::thread([&, i] { + threads[i] = boost::thread([&, i] { call_func(i, func, 0); properly_finished_threads.inc(); }); |