summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp')
-rw-r--r--3rdparty/asio/src/examples/cpp11/spawn/parallel_grep.cpp6
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 954d9472bbe..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-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)
//
+#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.