mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 05:17:26 +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
|
// Building a tracked executor ensures that the underlying context's
|
||||||
// run() function will not return until the tracked executor is destroyed
|
// run() function will not return until the tracked executor is destroyed
|
||||||
net::any_io_executor work =
|
net::any_io_executor work =
|
||||||
net::prefer(
|
net::require(
|
||||||
ioc.get_executor(),
|
ioc.get_executor(),
|
||||||
net::execution::outstanding_work.tracked);
|
net::execution::outstanding_work.tracked);
|
||||||
|
|
||||||
|
@ -85,7 +85,8 @@ public:
|
|||||||
std::ostream& log,
|
std::ostream& log,
|
||||||
kind k = kind::sync)
|
kind k = kind::sync)
|
||||||
: log_(log)
|
: 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_)
|
, ts_(ioc_)
|
||||||
, ws_(ts_)
|
, ws_(ts_)
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ using tcp = net::ip::tcp;
|
|||||||
|
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
net::any_io_executor work =
|
net::any_io_executor work =
|
||||||
net::prefer(ioc.get_executor(),
|
net::require(ioc.get_executor(),
|
||||||
net::execution::outstanding_work.tracked);
|
net::execution::outstanding_work.tracked);
|
||||||
std::thread t{[&](){ ioc.run(); }};
|
std::thread t{[&](){ ioc.run(); }};
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ void fxx() {
|
|||||||
|
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
net::any_io_executor work =
|
net::any_io_executor work =
|
||||||
net::prefer(
|
net::require(
|
||||||
ioc.get_executor(),
|
ioc.get_executor(),
|
||||||
net::execution::outstanding_work.tracked);
|
net::execution::outstanding_work.tracked);
|
||||||
std::thread t{[&](){ ioc.run(); }};
|
std::thread t{[&](){ ioc.run(); }};
|
||||||
|
@ -18,7 +18,7 @@ using tcp = net::ip::tcp;
|
|||||||
error_code ec;
|
error_code ec;
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
net::any_io_executor work =
|
net::any_io_executor work =
|
||||||
net::prefer(
|
net::require(
|
||||||
ioc.get_executor(),
|
ioc.get_executor(),
|
||||||
net::execution::outstanding_work.tracked);
|
net::execution::outstanding_work.tracked);
|
||||||
std::thread t{[&](){ ioc.run(); }};
|
std::thread t{[&](){ ioc.run(); }};
|
||||||
|
Reference in New Issue
Block a user