Boost.ASIO: upgrade io_service=>io_context, finally

This commit is contained in:
2026-05-30 11:59:42 -04:00
parent f100764bd8
commit 4266af545a
26 changed files with 91 additions and 90 deletions
+5 -5
View File
@@ -8,7 +8,7 @@
#include <functional>
#include <memory>
#include <boost/asio/io_service.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/post.hpp>
#include <spinscale/cps/callback.h>
@@ -30,10 +30,10 @@ public:
};
CpsCallbackAReq(
boost::asio::io_service &resumeIoService,
boost::asio::io_context &resumeIoContext,
StartFn startFn)
: asyncState(std::make_shared<AsyncState>()),
resumeIoService(resumeIoService)
resumeIoContext(resumeIoContext)
{
startFn(sscl::cps::Callback<CallbackFn>{
nullptr,
@@ -80,11 +80,11 @@ private:
return;
}
boost::asio::post(resumeIoService, handle);
boost::asio::post(resumeIoContext, handle);
}
std::shared_ptr<AsyncState> asyncState;
boost::asio::io_service &resumeIoService;
boost::asio::io_context &resumeIoContext;
};
} // namespace cpsBoundary