2
0
mirror of https://github.com/boostorg/asio.git synced 2026-01-19 04:02:09 +00:00

Make inline_executor the default candidate for associated_executor.

This commit is contained in:
Christopher Kohlhoff
2025-10-29 22:59:03 +11:00
parent 84c45dbe48
commit ca8e124b87
2 changed files with 5 additions and 4 deletions

View File

@@ -222,7 +222,7 @@ Certain objects that participate in asynchronous operations have an
An asynchronous operation has an associated executor satisfying the [link
boost_asio.reference.Executor1 `Executor`] requirements. If not otherwise specified by
the asynchronous operation, this associated executor is an object of type
`system_executor`.
`inline_executor`.
All asynchronous operations in this library have an associated I/O executor
object that is determined as follows:

View File

@@ -20,8 +20,9 @@
#include <boost/asio/detail/functional.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/execution/executor.hpp>
#include <boost/asio/execution_context.hpp>
#include <boost/asio/inline_executor.hpp>
#include <boost/asio/is_executor.hpp>
#include <boost/asio/system_executor.hpp>
#include <boost/asio/detail/push_options.hpp>
@@ -114,7 +115,7 @@ struct associated_executor_impl<T, E,
* get(t,e) and with return type @c type or a (possibly const) reference to @c
* type.
*/
template <typename T, typename Executor = system_executor>
template <typename T, typename Executor = inline_executor>
struct associated_executor
#if !defined(GENERATING_DOCUMENTATION)
: detail::associated_executor_impl<T, Executor>
@@ -177,7 +178,7 @@ get_associated_executor(const T& t, ExecutionContext& ctx,
typename ExecutionContext::executor_type>::get(t, ctx.get_executor());
}
template <typename T, typename Executor = system_executor>
template <typename T, typename Executor = inline_executor>
using associated_executor_t = typename associated_executor<T, Executor>::type;
namespace detail {