chore: Update boost usages to match 1.88 (#2355)

This commit is contained in:
Alex Kremer
2025-07-23 15:49:19 +01:00
committed by GitHub
parent bcaa5f3392
commit b29e2e4c88
40 changed files with 598 additions and 362 deletions

View File

@@ -20,6 +20,7 @@
#include "util/CoroutineGroup.hpp"
#include "util/Assert.hpp"
#include "util/Spawn.hpp"
#include <boost/asio/spawn.hpp>
#include <boost/asio/steady_timer.hpp>
@@ -48,7 +49,7 @@ CoroutineGroup::spawn(boost::asio::yield_context yield, std::function<void(boost
return false;
++childrenCounter_;
boost::asio::spawn(yield, [this, fn = std::move(fn)](boost::asio::yield_context yield) {
util::spawn(yield, [this, fn = std::move(fn)](boost::asio::yield_context yield) {
fn(yield);
onCoroutineCompleted();
});
@@ -64,7 +65,7 @@ CoroutineGroup::registerForeign(boost::asio::yield_context yield)
++childrenCounter_;
// It is important to spawn onCoroutineCompleted() to the same coroutine as will be calling asyncWait().
// timer_ here is not thread safe, so without spawn there could be a data race.
return [this, yield]() { boost::asio::spawn(yield, [this](auto&&) { onCoroutineCompleted(); }); };
return [this, yield]() { util::spawn(yield, [this](auto&&) { onCoroutineCompleted(); }); };
}
void