On Tue, May 20, 2014 at 1:05 PM, Julian Gonggrijp
I think the *right* design would be a concurrent equivalent of generic programming, where the only fundamental building blocks should be a well-designed statically typed SPSC queue, move semantics, a low-level thread launching utility (such as boost::thread) and a concise generic EDSL for the linking of nodes with queues. All further abstractions can be built on top of those ingredients (a bit like the STL is built on top of templates). It should allow me to do something like this:
start(readfile(input) | runlengthenc | huffmanenc | writefile(output));
At some point I want to publish a proposal for a library that does exactly this, but I need to find more time to work on it. The good news is that all necessary ingredients appear to already exist with C++11, Boost.Proto and Boost.Lockfree.
[OT, sorry...] Julian, are you familiar with this pipeline proposal? http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3534.html