mirror of
https://github.com/XRPLF/clio.git
synced 2026-07-30 02:20:28 +00:00
chore: Update boost usages to match 1.88 (#2355)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "cluster/ClioNode.hpp"
|
||||
#include "data/BackendInterface.hpp"
|
||||
#include "util/Spawn.hpp"
|
||||
#include "util/log/Logger.hpp"
|
||||
|
||||
#include <boost/asio/spawn.hpp>
|
||||
@@ -62,7 +63,7 @@ ClusterCommunicationService::ClusterCommunicationService(
|
||||
void
|
||||
ClusterCommunicationService::run()
|
||||
{
|
||||
boost::asio::spawn(strand_, [this](boost::asio::yield_context yield) {
|
||||
util::spawn(strand_, [this](boost::asio::yield_context yield) {
|
||||
boost::asio::steady_timer timer(yield.get_executor());
|
||||
while (true) {
|
||||
timer.expires_after(readInterval_);
|
||||
@@ -71,7 +72,7 @@ ClusterCommunicationService::run()
|
||||
}
|
||||
});
|
||||
|
||||
boost::asio::spawn(strand_, [this](boost::asio::yield_context yield) {
|
||||
util::spawn(strand_, [this](boost::asio::yield_context yield) {
|
||||
boost::asio::steady_timer timer(yield.get_executor());
|
||||
while (true) {
|
||||
doWrite();
|
||||
@@ -108,7 +109,7 @@ ClioNode
|
||||
ClusterCommunicationService::selfData() const
|
||||
{
|
||||
ClioNode result{};
|
||||
boost::asio::spawn(strand_, [this, &result](boost::asio::yield_context) { result = selfData_; });
|
||||
util::spawn(strand_, [this, &result](boost::asio::yield_context) { result = selfData_; });
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -119,7 +120,7 @@ ClusterCommunicationService::clusterData() const
|
||||
return std::unexpected{"Service is not healthy"};
|
||||
}
|
||||
std::vector<ClioNode> result;
|
||||
boost::asio::spawn(strand_, [this, &result](boost::asio::yield_context) {
|
||||
util::spawn(strand_, [this, &result](boost::asio::yield_context) {
|
||||
result = otherNodesData_;
|
||||
result.push_back(selfData_);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user