Fix TSAN issues part1 (#788)

Fixes a few issues from boost 1.82 migration and some Conan misconfigurations
This commit is contained in:
Alex Kremer
2023-07-26 21:39:39 +01:00
committed by GitHub
parent 02621fe02e
commit 68eec01dbc
18 changed files with 84 additions and 160 deletions

View File

@@ -167,13 +167,16 @@ struct SyncAsioContextTest : virtual public NoLoggerFixture
void
runSpawn(F&& f)
{
using namespace boost::asio;
auto called = false;
auto work = std::optional<boost::asio::io_context::work>{ctx};
boost::asio::spawn(ctx, [&](boost::asio::yield_context yield) {
auto strand = make_strand(ctx.get_executor());
spawn(strand, [&, _ = make_work_guard(strand)](yield_context yield) {
f(yield);
called = true;
work.reset();
});
ctx.run();
ASSERT_TRUE(called);
ctx.reset();