From 15295ac05e67ce24dd6594e22d1a53083414ea3c Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Tue, 19 May 2026 06:45:59 -0400 Subject: [PATCH] Update reutrn type --- include/spinscale/componentThread.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/include/spinscale/componentThread.h b/include/spinscale/componentThread.h index b952003..e3b38c8 100644 --- a/include/spinscale/componentThread.h +++ b/include/spinscale/componentThread.h @@ -168,10 +168,11 @@ public: const std::shared_ptr &_selfPtr = nullptr) : threadOp(_threadOp), parentThread(_parentThread), selfPtr(_selfPtr) { - std::function callback = [this](bool success) + cps::Callback callback = [this] { settled = true; - retval = success; + if (callerSchedHandle) + { callerSchedHandle.resume(); } }; if (threadOp == ThreadOp::JOLT && selfPtr == nullptr) @@ -214,14 +215,10 @@ public: return true; } - bool await_resume() noexcept - { - return retval; - } + void await_resume() noexcept {} bool settled = false; - bool retval = false; - std::coroutine_handle const callerSchedHandle; + std::coroutine_handle callerSchedHandle; PuppetThread &parentThread; const std::shared_ptr selfPtr; };