From 9ec581009f4790a6874d7703d996d084e08e3c76 Mon Sep 17 00:00:00 2001 From: Andreas Fankhauser hiddenalpha.ch Date: Wed, 7 Jan 2026 12:12:58 +0100 Subject: Add `err` param for Scheduler tasks so they can be cancelled --- include/qntan/Qntan.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/qntan') diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index b7e9d72..50abf24 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -250,8 +250,10 @@ struct Qntan_Executor { struct Qntan_Scheduler { /**/ void (*onceAfterMs)( - struct Qntan_Scheduler**, int delayMs, void(*fn)(Qntan_Cls), Qntan_Cls ); + struct Qntan_Scheduler**, int delayMs, void(*fn)(int err,Qntan_Cls), Qntan_Cls ); /* Schedule 'fn' to be called after 'delayMs' milliseconds. + * `err` holds negative values on error. For example it could be + * `-ECANCELED` if the scheduled task got canceled. * TODO: Specify if time refers to wall-clock, monotonic, etc. For now this * behavior is implementation-defined, BUT MAY IT WILL BE SPECIFIED HERE IN * FUTURE! -- cgit v1.3.1