Fri Dec 27 19:20:54 CET 2019
Often I really want tasks that are as efficient as state machines.
As established before, there are two problems:
- split code into resume points
- represent local stack frame for each resume point
Tasks really are very convenient, precisely because they are already
EDIT: Doing this in bare C: I ran into a case where an explicit stack
+ control loop made sense. Resume points appeared in places that made
conversion to proper states very awkward. Sometimes you really just
want a blocking call... If the type of data that is associated with
the resume point is simple it makes sense just to return the resume
address and let caller pass in that address again.