diff options
author | 2024-04-22 08:04:58 +1000 | |
---|---|---|
committer | 2024-04-22 08:04:58 +1000 | |
commit | 184292b730f4236bd4840e780fdad97ee060ec84 (patch) | |
tree | 67902161a465fe92aec78ca502de07092b8cde0f /3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp | |
parent | 24154bc1f00790f344120b3a85175d6f616c5ad0 (diff) |
3rdparty/asio: Updated to 1.30.2
Diffstat (limited to '3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp')
-rw-r--r-- | 3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp b/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp index fc2c6ecd1c2..f4a5b1136dc 100644 --- a/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp +++ b/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp @@ -2,12 +2,13 @@ // parallel_grep.cpp // ~~~~~~~~~~~~~~~~~ // -// Copyright (c) 2003-2021 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) // +#include <asio/detached.hpp> #include <asio/dispatch.hpp> #include <asio/post.hpp> #include <asio/spawn.hpp> @@ -17,6 +18,7 @@ #include <iostream> #include <string> +using asio::detached; using asio::dispatch; using asio::spawn; using asio::strand; @@ -69,7 +71,7 @@ int main(int argc, char* argv[]) if (++line_num % 10 == 0) post(yield); } - }); + }, detached); } // Join the thread pool to wait for all the spawned tasks to complete. |