forked from boostorg/beast
Support BOOST_ASIO_NO_TS_EXECUTORS
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user