mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-04 01:06:45 +00:00
chore: Update boost usages to match 1.88 (#2355)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user