//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2020 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)
\until asio.hpp
-All programs that use asio need to have at least one boost::asio::io_context object.
-This class provides access to I/O functionality. We declare an object of this
-type first thing in the main function.
+All programs that use asio need to have at least one I/O execution context,
+such as an boost::asio::io_context or boost::asio::thread_pool object. An I/O execution
+context provides access to I/O functionality. We declare an object of type
+boost::asio::io_context first thing in the main function.
\until boost::asio::io_context
/**
\page tuttimer5 Timer.5 - Synchronising handlers in multithreaded programs
-This tutorial demonstrates the use of the boost::asio::io_context::strand class to
+This tutorial demonstrates the use of the boost::asio::strand class template to
synchronise callback handlers in a multithreaded program.
The previous four tutorials avoided the issue of handler synchronisation by
In addition to initialising a pair of boost::asio::steady_timer members, the
constructor initialises the <tt>strand_</tt> member, an object of type
-boost::asio::io_context::strand.
+boost::asio::strand<boost::asio::io_context::executor_type>.
-An boost::asio::io_context::strand is an executor that guarantees that, for those
-handlers that are dispatched through it, an executing handler will be allowed
-to complete before the next one is started. This is guaranteed irrespective of
-the number of threads that are calling boost::asio::io_context::run(). Of course, the
-handlers may still execute concurrently with other handlers that were
-<b>not</b> dispatched through an boost::asio::io_context::strand, or were dispatched
-through a different boost::asio::io_context::strand object.
+The boost::asio::strand class template is an executor adapter that guarantees
+that, for those handlers that are dispatched through it, an executing handler
+will be allowed to complete before the next one is started. This is guaranteed
+irrespective of the number of threads that are calling
+boost::asio::io_context::run(). Of course, the handlers may still execute
+concurrently with other handlers that were <b>not</b> dispatched through an
+boost::asio::strand, or were dispatched through a different boost::asio::strand
+object.
\until {
When initiating the asynchronous operations, each callback handler is "bound"
-to an boost::asio::io_context::strand object. The
-boost::asio::io_context::strand::bind_executor() function returns a new handler that
-automatically dispatches its contained handler through the
-boost::asio::io_context::strand object. By binding the handlers to the same
-boost::asio::io_context::strand, we are ensuring that they cannot execute
-concurrently.
+to an boost::asio::strand<boost::asio::io_context::executor_type> object. The
+boost::asio::bind_executor() function returns a new handler that automatically
+dispatches its contained handler through the boost::asio::strand object. By
+binding the handlers to the same boost::asio::strand, we are ensuring that they
+cannot execute concurrently.
\until }
\until }