taskKS, the task-function caller on demand, will be enhanced via 2 new features:
- signals
- messages
Signals: Direct information&starting of a task-fn with one from upto 32 signals. No Data. You could force a direct start of a task-fn specific signal-fn to inject a specific event into one task.
Messages: With including an easy construct in your task-fn you could serve received messages. And from nearly any point of this thread - taskKS is single-threaded - you could inject messages to a task-fn which is inititialized to receive messages.
Hence state-machines could be build easier, especially if one (small) subsystem has multiple state-machines who interact with each other.
What is not supported via taskKS:
- external Injection of data/events: from foreign threads you had to care by yourself to do not create race-conditions and data-inconsistency. Suggestion to solve this: create one task-fn which supports external message injection. Use a mutex to protect external and forwarding task-fn access to this specific msg-box; this task-fn does nothing else than forwarding external messages into this taskKS instance.
- timer: no timers/timeout function. Suggestion: U could use TOTimer and embed the service-call as one task-fn (usually poll-mode).
- IO and more. taskKS is now just a small framework to serve taskKS task-fns - on demand - only (!) (or for controlled polling if needed); IO abstraction is not a part of taskKS.
If you try taskKS (0.2.0) and you have some suggestions, critics and more, please do not hesitate to write to me. Thanks.