Examples require tracked

This commit is contained in:
Richard Hodges
2020-07-04 08:22:57 +02:00
parent de1e63c597
commit a9b5bf343d
5 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -85,7 +85,8 @@ public:
std::ostream& log,
kind k = kind::sync)
: log_(log)
, work_(net::prefer(ioc_.get_executor(), net::execution::outstanding_work.tracked))
, work_(net::require(ioc_.get_executor(),
net::execution::outstanding_work.tracked))
, ts_(ioc_)
, ws_(ts_)
{
+1 -1
View File
@@ -39,7 +39,7 @@ using tcp = net::ip::tcp;
net::io_context ioc;
net::any_io_executor work =
net::prefer(ioc.get_executor(),
net::require(ioc.get_executor(),
net::execution::outstanding_work.tracked);
std::thread t{[&](){ ioc.run(); }};
+1 -1
View File
@@ -38,7 +38,7 @@ void fxx() {
net::io_context ioc;
net::any_io_executor work =
net::prefer(
net::require(
ioc.get_executor(),
net::execution::outstanding_work.tracked);
std::thread t{[&](){ ioc.run(); }};
+1 -1
View File
@@ -18,7 +18,7 @@ using tcp = net::ip::tcp;
error_code ec;
net::io_context ioc;
net::any_io_executor work =
net::prefer(
net::require(
ioc.get_executor(),
net::execution::outstanding_work.tracked);
std::thread t{[&](){ ioc.run(); }};