Collate Using ProtoThreads

23 views
Skip to first unread message

Paul Tarvydas

unread,
Nov 10, 2015, 2:01:56 PM11/10/15
to Flow Based Programming
Here is the collate component implemented using protothreads.  Collate is on page 91. of JPM's book (2nd ed).

https://github.com/guitarvydas/collate-protothreads

Protothreads are very similar to the "threads" used by bmFBP - one stack, no "processes".  In fact, protothreads, and bmFBP, borrow from the knowledge of how threading works in bigger operating systems, but throws away the unnecessary features of such operating systems, showing that FBP can be implemented very efficiently (essentially a "language" instead of an "operating system").

Protothreads has been succeeded by Contiki (also involving Adam Dunkels) - a complete process-less operating system for IoT (internet of things).  Very low memory usage.

One might note a similarity to Duff's Device.

pt

Reply all
Reply to author
Forward
0 new messages