forked from boostorg/beast
New name for polymorphic executor. Trait for detecting new executors
This commit is contained in:
@@ -182,7 +182,7 @@ class async_base
|
||||
#endif
|
||||
{
|
||||
static_assert(
|
||||
net::is_executor<Executor1>::value,
|
||||
net::is_executor<Executor1>::value || net::execution::is_executor<Executor1>::value,
|
||||
"Executor type requirements not met");
|
||||
|
||||
Handler h_;
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace beast {
|
||||
|
||||
@tparam Executor A type meeting the requirements of <em>Executor</em> to
|
||||
be used for submitting all completion handlers which do not already have an
|
||||
associated executor. If this type is omitted, the default of `net::executor`
|
||||
associated executor. If this type is omitted, the default of `net::any_io_executor`
|
||||
will be used.
|
||||
|
||||
@par Thread Safety
|
||||
@@ -197,7 +197,7 @@ namespace beast {
|
||||
*/
|
||||
template<
|
||||
class Protocol,
|
||||
class Executor = net::executor,
|
||||
class Executor = net::any_io_executor,
|
||||
class RatePolicy = unlimited_rate_policy
|
||||
>
|
||||
class basic_stream
|
||||
@@ -233,7 +233,8 @@ public:
|
||||
using endpoint_type = typename Protocol::endpoint;
|
||||
|
||||
private:
|
||||
static_assert(net::is_executor<Executor>::value,
|
||||
static_assert(
|
||||
net::is_executor<Executor>::value || net::execution::is_executor<Executor>::value,
|
||||
"Executor type requirements not met");
|
||||
|
||||
struct impl_type
|
||||
|
||||
@@ -56,7 +56,7 @@ get_io_context(net::strand<Executor> const& ex)
|
||||
template<
|
||||
class T,
|
||||
class = typename std::enable_if<
|
||||
std::is_same<T, net::executor>::value>::type>
|
||||
std::is_same<T, net::executor>::value || std::is_same<T, net::any_io_executor>::value>::type>
|
||||
net::io_context*
|
||||
get_io_context(T const& ex)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace beast {
|
||||
*/
|
||||
using tcp_stream = basic_stream<
|
||||
net::ip::tcp,
|
||||
net::executor,
|
||||
net::any_io_executor,
|
||||
unlimited_rate_policy>;
|
||||
|
||||
} // beast
|
||||
|
||||
Reference in New Issue
Block a user