summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2024-04-22 08:04:58 +1000
committer Vas Crabb <vas@vastheman.com>2024-04-22 08:04:58 +1000
commit184292b730f4236bd4840e780fdad97ee060ec84 (patch)
tree67902161a465fe92aec78ca502de07092b8cde0f /3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
parent24154bc1f00790f344120b3a85175d6f616c5ad0 (diff)
3rdparty/asio: Updated to 1.30.2
Diffstat (limited to '3rdparty/asio/src/examples/cpp14/executors/async_1.cpp')
-rw-r--r--3rdparty/asio/src/examples/cpp14/executors/async_1.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp b/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
index 2fb8ba56548..0d1bdfcb8bd 100644
--- a/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
+++ b/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
@@ -20,16 +20,14 @@ void async_getline(IoExecutor io_ex, std::istream& is, Handler handler)
execution::outstanding_work.tracked);
// Post a function object to do the work asynchronously.
- execution::execute(
- asio::require(io_ex, execution::blocking.never),
+ asio::require(io_ex, execution::blocking.never).execute(
[&is, work_ex, handler=std::move(handler)]() mutable
{
std::string line;
std::getline(is, line);
// Pass the result to the handler, via the associated executor.
- execution::execute(
- asio::prefer(work_ex, execution::blocking.possibly),
+ asio::prefer(work_ex, execution::blocking.possibly).execute(
[line=std::move(line), handler=std::move(handler)]() mutable
{
handler(std::move(line));