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:
@@ -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:
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user