-
Notifications
You must be signed in to change notification settings - Fork 270
Creating TaskScheduler friendly libraries
From the task scheduling perspective all libraries fall into two major categories:
- Single-operation oriented
- Repetitive process oriented
Single operations oriented libraries are those that do something (or multiple things) once, and then exit (return a value, an array, etc.). There is no internal scheduling required, although some pre-defined sequence of actions is needed, and there could be certain delays necessary due to hardware timing, etc. Example: libraries to read sensor values. Repetitive process oriented libraries do something many times on behalf of the developer in a transparent manner. Those need internal scheduling to perform actions periodically or continuously in the background. Example: mesh network libraries.
Single operations oriented libraries deal with I/O (hardware, telecommunications, measurements) very frequently require delays to "wait" for events, data, hardware to become ready, etc. Those libraries are often implemented in a synchronous way, i.e., the whole processing stops until library finishes processing, while in many cases, library is just waiting for something to happen. Repetitive process oriented libraries often implement their own scheduling mechanism which is embedded and hidden from the developers, and does not play weel with external schedulers, like TaskScheduler.
to be continued
to be continued