summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/asio/src/examples/cpp14/executors/async_1.cpp
diff options
context:
space:
mode:
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));