diff options
Diffstat (limited to '3rdparty/asio/src/tests/performance')
-rw-r--r-- | 3rdparty/asio/src/tests/performance/.gitignore | 11 | ||||
-rw-r--r-- | 3rdparty/asio/src/tests/performance/client.cpp | 12 | ||||
-rw-r--r-- | 3rdparty/asio/src/tests/performance/handler_allocator.hpp | 2 | ||||
-rw-r--r-- | 3rdparty/asio/src/tests/performance/server.cpp | 8 |
4 files changed, 11 insertions, 22 deletions
diff --git a/3rdparty/asio/src/tests/performance/.gitignore b/3rdparty/asio/src/tests/performance/.gitignore deleted file mode 100644 index 692ea7e7e65..00000000000 --- a/3rdparty/asio/src/tests/performance/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -.deps -.dirstamp -*.o -*.obj -*.exe -client -server -*.ilk -*.manifest -*.pdb -*.tds diff --git a/3rdparty/asio/src/tests/performance/client.cpp b/3rdparty/asio/src/tests/performance/client.cpp index 6851d32fc9e..b42a6c50930 100644 --- a/3rdparty/asio/src/tests/performance/client.cpp +++ b/3rdparty/asio/src/tests/performance/client.cpp @@ -2,7 +2,7 @@ // client.cpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,7 +10,7 @@ #include "asio.hpp" #include <algorithm> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <boost/mem_fn.hpp> #include <iostream> #include <list> @@ -51,7 +51,7 @@ class session { public: session(asio::io_context& ioc, size_t block_size, stats& s) - : strand_(ioc), + : strand_(ioc.get_executor()), socket_(ioc), block_size_(block_size), read_data_(new char[block_size]), @@ -173,7 +173,7 @@ private: } private: - asio::io_context::strand strand_; + asio::strand<asio::io_context::executor_type> strand_; asio::ip::tcp::socket socket_; size_t block_size_; char* read_data_; @@ -198,7 +198,7 @@ public: sessions_(), stats_() { - stop_timer_.expires_from_now(boost::posix_time::seconds(timeout)); + stop_timer_.expires_after(asio::chrono::seconds(timeout)); stop_timer_.async_wait(boost::bind(&client::handle_timeout, this)); for (size_t i = 0; i < session_count; ++i) @@ -228,7 +228,7 @@ public: private: asio::io_context& io_context_; - asio::deadline_timer stop_timer_; + asio::steady_timer stop_timer_; std::list<session*> sessions_; stats stats_; }; diff --git a/3rdparty/asio/src/tests/performance/handler_allocator.hpp b/3rdparty/asio/src/tests/performance/handler_allocator.hpp index b8609049728..6c1b98532ab 100644 --- a/3rdparty/asio/src/tests/performance/handler_allocator.hpp +++ b/3rdparty/asio/src/tests/performance/handler_allocator.hpp @@ -2,7 +2,7 @@ // handler_allocator.cpp // ~~~~~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) diff --git a/3rdparty/asio/src/tests/performance/server.cpp b/3rdparty/asio/src/tests/performance/server.cpp index be8c3813ece..9de3c1294f8 100644 --- a/3rdparty/asio/src/tests/performance/server.cpp +++ b/3rdparty/asio/src/tests/performance/server.cpp @@ -2,7 +2,7 @@ // server.cpp // ~~~~~~~~~~ // -// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com) +// Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,7 +10,7 @@ #include "asio.hpp" #include <algorithm> -#include <boost/bind.hpp> +#include <boost/bind/bind.hpp> #include <iostream> #include <list> #include "handler_allocator.hpp" @@ -20,7 +20,7 @@ class session public: session(asio::io_context& ioc, size_t block_size) : io_context_(ioc), - strand_(ioc), + strand_(ioc.get_executor()), socket_(ioc), block_size_(block_size), read_data_(new char[block_size]), @@ -129,7 +129,7 @@ public: private: asio::io_context& io_context_; - asio::io_context::strand strand_; + asio::strand<asio::io_context::executor_type> strand_; asio::ip::tcp::socket socket_; size_t block_size_; char* read_data_; |