]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/asio/example/cpp11/futures/daytime_client.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / asio / example / cpp11 / futures / daytime_client.cpp
index 282993e6ae9c1c32c73cc972313f10ab8ecdff3d..be763fb4c888723a7620518fae03bde4a73711da 100644 (file)
@@ -2,7 +2,7 @@
 // daytime_client.cpp
 // ~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2022 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)
@@ -77,8 +77,7 @@ int main(int argc, char* argv[])
     // We run the io_context off in its own thread so that it operates
     // completely asynchronously with respect to the rest of the program.
     boost::asio::io_context io_context;
-    auto work = boost::asio::require(io_context.get_executor(),
-        boost::asio::execution::outstanding_work.tracked);
+    auto work = boost::asio::make_work_guard(io_context);
     std::thread thread([&io_context](){ io_context.run(); });
 
     get_daytime(io_context, argv[1]);