summaryrefslogtreecommitdiff
path: root/include/qntan/Qntan.h
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2026-01-07 12:12:58 +0100
committerAndreas Fankhauser hiddenalpha.ch2026-01-07 12:12:58 +0100
commit9ec581009f4790a6874d7703d996d084e08e3c76 (patch)
treefc80c301e2703e2126ec394619e04247359d3009 /include/qntan/Qntan.h
parentdaf31149e5c63028d6401e843115ddc343741d3f (diff)
downloadQntan-9ec581009f4790a6874d7703d996d084e08e3c76.tar.gz
Qntan-9ec581009f4790a6874d7703d996d084e08e3c76.zip
Add `err` param for Scheduler tasks so they can be cancelled
Diffstat (limited to 'include/qntan/Qntan.h')
-rw-r--r--include/qntan/Qntan.h4
1 files changed, 3 insertions, 1 deletions
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!