light weight "threads"

40 views
Skip to first unread message

Paul Tarvydas

unread,
Feb 5, 2015, 11:38:00 AM2/5/15
to flow-based-...@googlegroups.com
Here is a preliminary solution to the "collate" problem (page 91 of The
Book), using a single stack and 0 (zero, no) threads.

Although I've only tested it lightly, I believe that it conforms to FBP
semantics (aka Classic FBP) using bounded queues.

The only restriction is that a Looper must contain a Send or a Receive
(or a yet-to-be-implemented Yield).


https://github.com/guitarvydas/collate-fbp-classic


This technique should be easier in any language less-stunted than C
(esp. any language that treats functions as first-class objects).

I see no reason why this cannot be implemented in js.

My fundamental concern is with "efficiency". This, I believe,
demonstrates that FBP can be implemented very efficiently.

I'll describe it in more detail on my blog, when I have time. In the
meantime, questions are most welcome.

pt

Reply all
Reply to author
Forward
0 new messages