New name for polymorphic executor. Trait for detecting new executors

This commit is contained in:
Christopher Kohlhoff
2020-07-04 07:34:34 +02:00
committed by Richard Hodges
parent 22f2f5dcf4
commit 55302a3f8f
13 changed files with 22 additions and 19 deletions
+1 -1
View File
@@ -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_;
+4 -3
View File
@@ -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)
{
+1 -1
View File
@@ -25,7 +25,7 @@ namespace beast {
*/
using tcp_stream = basic_stream<
net::ip::tcp,
net::executor,
net::any_io_executor,
unlimited_rate_policy>;
} // beast