It was a mistake in JeeH to call something a Task
when it really is a
Thread
, so I’ve decided to rename them everywhere in the code and in the
documentation. Threads are separate execution contexts, each with their own
stack. And that’s what’s in JeeH right now.
Threads #
Threads are a bit of a double-edged sword: yes, you can nicely modularise different parts of an application this way, especially in the context of a µC where lots of external events and interrupts are going on. But on a single-CPU system (i.e. all but the most extensive ARM Cortex µCs) they still need to run one at a time. There is no real parallelism going on. The inconvenience of threads is that each one needs to have its own stack area, each sized to handle peak memory needs, even though most of it will not be used at the same time. It can be quite wasteful, especially on a RAM-constrained µC.
...