forked from boostorg/beast
Support BOOST_ASIO_NO_TS_EXECUTORS
This commit is contained in:
20 files changed
+285
-92
No files matched your search
@@ -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