From 0dcfa754b6d38a7432b8e73581c5fa72a2f48618 Mon Sep 17 00:00:00 2001 From: Hayodea Hekol Date: Sun, 17 May 2026 17:11:43 -0400 Subject: [PATCH] Call std::terminate if await_* are called on NonViral*Invoker --- include/spinscale/co/invokers.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/include/spinscale/co/invokers.h b/include/spinscale/co/invokers.h index 55bc00a..a182ad8 100644 --- a/include/spinscale/co/invokers.h +++ b/include/spinscale/co/invokers.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include @@ -59,26 +60,13 @@ struct NonViralNonSuspendingInvoker using PostingInvoker, void>::PostingInvoker; bool await_ready() const noexcept - { -#ifdef CONFIG_LIBSSCL_DEBUG_CO - std::cout << __func__ << ": " << std::this_thread::get_id() << " This shouldn't be called.\n"; -#endif - return true; - } + { std::terminate(); } void await_suspend(std::coroutine_handle>) noexcept - { -#ifdef CONFIG_LIBSSCL_DEBUG_CO - std::cout << __func__ << ": " << std::this_thread::get_id() << " This shouldn't be called.\n"; -#endif - } + { std::terminate(); } void await_resume() noexcept - { -#ifdef CONFIG_LIBSSCL_DEBUG_CO - std::cout << __func__ << ": " << std::this_thread::get_id() << " This shouldn't be called.\n"; -#endif - } + { std::terminate(); } }; /** Viral awaitable: promise_type inherits PostingPromiseTemplate (posting