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
+3 -3
View File
@@ -32,13 +32,13 @@ public:
BEAST_EXPECT(get_io_context(ioc) == &ioc);
BEAST_EXPECT(get_io_context(ioc.get_executor()) == &ioc);
BEAST_EXPECT(get_io_context(net::make_strand(ioc)) == &ioc);
BEAST_EXPECT(get_io_context(net::executor(ioc.get_executor())) == &ioc);
BEAST_EXPECT(get_io_context(net::any_io_executor(ioc.get_executor())) == &ioc);
#if 0
// VFALCO FIXME
BEAST_EXPECT(
get_io_context(
net::strand<net::executor>(
net::executor(ioc.get_executor()))) == &ioc);
net::strand<net::any_io_executor>(
net::any_io_executor(ioc.get_executor()))) == &ioc);
#endif
}
+2 -2
View File
@@ -43,12 +43,12 @@ namespace beast {
#if 0
template class basic_stream<
net::ip::tcp,
net::executor,
net::any_io_executor,
unlimited_rate_policy>;
template class basic_stream<
net::ip::tcp,
net::executor,
net::any_io_executor,
simple_rate_policy>;
#endif
+1 -1
View File
@@ -28,7 +28,7 @@ public:
net::make_strand(ioc.get_executor());
net::make_strand(net::make_strand(ioc));
net::executor ex(ioc.get_executor());
net::any_io_executor ex(ioc.get_executor());
net::make_strand(ex);
// this *should-not* compile
+1 -1
View File
@@ -378,7 +378,7 @@ public:
using socket_type =
net::basic_stream_socket<
net::ip::tcp,
net::executor>;
net::any_io_executor>;
net::io_context ioc;
stream<socket_type> ws1(ioc);
stream<socket_type> ws2(ioc);
+1 -1
View File
@@ -62,7 +62,7 @@ public:
boost::asio::ssl::stream<
boost::asio::basic_stream_socket<
boost::asio::ip::tcp,
boost::asio::executor>>>();
net::any_io_executor>>>();
}
};
+1 -1
View File
@@ -288,7 +288,7 @@ struct associated_allocator<handler, Allocator>
template<class Executor>
struct associated_executor<handler, Executor>
{
using type = boost::asio::executor;
using type = boost::asio::any_io_executor;
static
type
+3 -3
View File
@@ -205,7 +205,7 @@ core_3_timeouts_snippets()
// if the choice of RatePolicy is not DefaultConstructible,
// an instance of the type may be passed to the constructor.
basic_stream<net::ip::tcp, net::executor, simple_rate_policy> stream(ioc);
basic_stream<net::ip::tcp, net::any_io_executor, simple_rate_policy> stream(ioc);
// The policy object, which is default constructed, or
// decay-copied upon construction, is attached to the stream
@@ -586,7 +586,7 @@ core_3_timeouts_snippets2()
//[code_core_3_timeouts_9
// This stream will use our new rate_gauge policy
basic_stream<net::ip::tcp, net::executor, rate_gauge> stream(ioc);
basic_stream<net::ip::tcp, net::any_io_executor, rate_gauge> stream(ioc);
//...
@@ -600,7 +600,7 @@ core_3_timeouts_snippets2()
} // (anon)
template class basic_stream<net::ip::tcp, net::executor, rate_gauge>;
template class basic_stream<net::ip::tcp, net::any_io_executor, rate_gauge>;
struct core_3_timeouts_test
: public beast::unit_test::suite