diff --git a/test/v1/async_system_stackful.cpp b/test/v1/async_system_stackful.cpp index b404c02b1..bc6fc424e 100644 --- a/test/v1/async_system_stackful.cpp +++ b/test/v1/async_system_stackful.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -48,7 +49,7 @@ BOOST_AUTO_TEST_CASE(stackful, *boost::unit_test::timeout(15)) }; boost::asio::io_context::strand str{ios}; - boost::asio::post(str, [&]{boost::asio::spawn(ios, stackful);}); + boost::asio::post(str, [&]{boost::asio::spawn(ios, stackful, boost::asio::detached);}); boost::asio::post(str, [&]{did_something_else = true;}); ios.run(); diff --git a/test/v1/async_system_stackful_error.cpp b/test/v1/async_system_stackful_error.cpp index 3ec04419c..be0ce8a91 100644 --- a/test/v1/async_system_stackful_error.cpp +++ b/test/v1/async_system_stackful_error.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -46,7 +47,7 @@ BOOST_AUTO_TEST_CASE(stackful, *boost::unit_test::timeout(15)) BOOST_CHECK(did_something_else); }; - boost::asio::spawn(ios, stackful); + boost::asio::spawn(ios, stackful, boost::asio::detached); boost::asio::post(ios.get_executor(), [&]{did_something_else = true;}); ios.run(); @@ -72,7 +73,7 @@ BOOST_AUTO_TEST_CASE(stackful_except, *boost::unit_test::timeout(15)) BOOST_CHECK(did_something_else); }; - boost::asio::spawn(ios, stackful); + boost::asio::spawn(ios, stackful, boost::asio::detached); boost::asio::post(ios.get_executor(), [&]{did_something_else = true;}); ios.run(); @@ -101,7 +102,7 @@ BOOST_AUTO_TEST_CASE(stackful_error, *boost::unit_test::timeout(15)) BOOST_CHECK(did_something_else); }; - boost::asio::spawn(ios, stackful); + boost::asio::spawn(ios, stackful, boost::asio::detached); boost::asio::post(ios.get_executor(), [&]{did_something_else = true;}); ios.run(); diff --git a/test/v1/async_system_stackful_except.cpp b/test/v1/async_system_stackful_except.cpp index ff3954852..0efb34fde 100644 --- a/test/v1/async_system_stackful_except.cpp +++ b/test/v1/async_system_stackful_except.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -45,7 +46,7 @@ BOOST_AUTO_TEST_CASE(stackful_except, *boost::unit_test::timeout(15)) BOOST_CHECK(did_something_else); }; - boost::asio::spawn(ios, stackful); + boost::asio::spawn(ios, stackful, boost::asio::detached); boost::asio::post(ios.get_executor(), [&]{did_something_else = true;}); ios.run();