LWN.net Logo

A look at C++14, part 1

A look at C++14, part 1

Posted Mar 28, 2013 23:47 UTC (Thu) by tpo (subscriber, #25713)
In reply to: A look at C++14, part 1 by nix
Parent article: A look at C++14, part 1

Pipelines start to be really exciting, when they auto-parallelize their individual stages. If you have that, you can start doing CSP style programming, which spares you a lot of the pain shared state concurrent programming would cause you.

Does your implementation provide nice syntax (via a macro?) and do autoparallelization? I'd would love to see that code... :-)

*t


(Log in to post comments)

A look at C++14, part 1

Posted Mar 29, 2013 15:43 UTC (Fri) by nix (subscriber, #2304) [Link]

It didn't provide particularly nice syntax: it just provided a way to chain functions onto the stdin, stdout and stderr (optionally combined) of fork()/exec()ed subprocesses, so it looked like execl() with extra arguments jammed on the start to signify the stdin / stdout / stderr functions (if any: if none, /dev/null got attached to that fd instead). No pretty pipelining unless you invoked the function again in the stdout or stderr functions. But, obviously, the thing was parallelized: it was just pipes under the surface, after all.

This proposal is definitely better than what I hacked up. :)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds