diff options
Diffstat (limited to '3rdparty/asio/src/examples/cpp14/executors/async_2.cpp')
-rw-r--r-- | 3rdparty/asio/src/examples/cpp14/executors/async_2.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp b/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp index b8a28e68b87..ee4a72e80c3 100644 --- a/3rdparty/asio/src/examples/cpp14/executors/async_2.cpp +++ b/3rdparty/asio/src/examples/cpp14/executors/async_2.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)); |