// 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)
// 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]);