From 1d1cb099dba2d5421d9f9e07b602408e4041d1aa Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Sun, 17 May 2026 17:12:11 -0400 Subject: [PATCH] Regress to io_service rather than io_context --- include/spinscale/co/promises.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/include/spinscale/co/promises.h b/include/spinscale/co/promises.h index 3c07aaa..c05f42e 100644 --- a/include/spinscale/co/promises.h +++ b/include/spinscale/co/promises.h @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -191,19 +190,19 @@ struct PostingPromise : public std::suspend_always { InitialSuspendPostingInvoker( - boost::asio::io_context &targetIoContextIn, + boost::asio::io_service &targetIoServiceIn, std::coroutine_handle<> targetSchedHandleIn) noexcept - : targetIoContext(targetIoContextIn), + : targetIoService(targetIoServiceIn), targetSchedHandle(targetSchedHandleIn) {} bool await_suspend(std::coroutine_handle<> const) noexcept { - boost::asio::post(targetIoContext, targetSchedHandle); + boost::asio::post(targetIoService, targetSchedHandle); return true; } - boost::asio::io_context &targetIoContext; + boost::asio::io_service &targetIoService; std::coroutine_handle<> targetSchedHandle; }; @@ -353,7 +352,7 @@ struct TaggedPostingPromise std::cout << __func__ << ": " << std::this_thread::get_id() << " Returning InitialSuspendPostingInvoker.\n"; #endif return typename PostingPromise::InitialSuspendPostingInvoker( - ThreadTag::io_context(), + ThreadTag::io_service(), this->selfSchedHandle); } };