Support BOOST_ASIO_NO_TS_EXECUTORS

This commit is contained in:
Richard Hodges committed 2020-07-04 07:35:14 +02:00
1 parent 5f1adfbc6d
commit 060f59685c
20 files changed
+285 -92

No files matched your search

+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);