mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
Examples require tracked
This commit is contained in:
@ -358,7 +358,7 @@ int main(int argc, char* argv[])
|
||||
// Building a tracked executor ensures that the underlying context's
|
||||
// run() function will not return until the tracked executor is destroyed
|
||||
net::any_io_executor work =
|
||||
net::prefer(
|
||||
net::require(
|
||||
ioc.get_executor(),
|
||||
net::execution::outstanding_work.tracked);
|
||||
|
||||
|
@ -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_)
|
||||
{
|
||||
|
@ -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(); }};
|
||||
|
||||
|
@ -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(); }};
|
||||
|
@ -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(); }};
|
||||
|
Reference in New Issue
Block a user