Support BOOST_ASIO_NO_TS_EXECUTORS

This commit is contained in:
Richard Hodges
2020-07-04 07:35:14 +02:00
parent 5f1adfbc6d
commit 060f59685c
20 changed files with 285 additions and 92 deletions
+3 -1
View File
@@ -38,7 +38,9 @@ namespace ssl = boost::asio::ssl;
using tcp = net::ip::tcp;
net::io_context ioc;
auto work = net::make_work_guard(ioc);
auto work = net::any_io_executor(
net::prefer(ioc.get_executor(),
net::execution::outstanding_work.tracked));
std::thread t{[&](){ ioc.run(); }};
error_code ec;
+4 -1
View File
@@ -37,7 +37,10 @@ net::const_buffer get_next_chunk_body()
void fxx() {
net::io_context ioc;
auto work = net::make_work_guard(ioc);
auto work = net::any_io_executor(
net::prefer(
ioc.get_executor(),
net::execution::outstanding_work.tracked));
std::thread t{[&](){ ioc.run(); }};
net::ip::tcp::socket sock{ioc};
+4 -1
View File
@@ -17,7 +17,10 @@ using tcp = net::ip::tcp;
error_code ec;
net::io_context ioc;
auto work = net::make_work_guard(ioc);
auto work = net::any_io_executor(
net::prefer(
ioc.get_executor(),
net::execution::outstanding_work.tracked));
std::thread t{[&](){ ioc.run(); }};
tcp::socket sock(ioc);