News for hackers. Stuff that matters.
Re:Lightweight concurrency library for C, featuring symmetri... by eaxitect on Friday October 18, 2013 @08:29AM (#6570981)
I also suggest libtask from Russ Cox http://swtch.com/libtask/
Re:Lightweight concurrency library for C, featuring symmetri... by fintler on Friday October 18, 2013 @10:32AM (#6571562)
If you plan on implementing anything with libtask, take a look at the version with epoll support.

https://github.com/jamwt/libtask

Mongrel2 is also an excellent example of how libtask can be used.

On another note, alts and chans are underrated in libtask -- I wish the documentation promoted them more. To get an idea of what alts look like when used with a few chans, take a look at keyboardthread() from acme:

http://plan9.bell-labs.com/sources/plan9/sys/src/cmd/acme/ac...

It's just... beautiful.

Re:Lightweight concurrency library for C, featuring symmetri... by xal on Friday October 18, 2013 @08:42AM (#6571021)
That's really interesting how much Go can be traced back to this library.
Re:Lightweight concurrency library for C, featuring symmetri... by eaxitect on Friday October 18, 2013 @09:06AM (#6571122)
Yes, actually check http://swtch.com/~rsc/thread/ to trace back. It all starts with CSP from Hoare.
Re:Lightweight concurrency library for C, featuring symmetri... by mturmon on Friday October 18, 2013 @11:58AM (#6572066)
In that link, I learned:

In 1980, barely two years after Hoare's paper, Gerard Holzmann and Rob Pike created a protocol analyzer called pan that takes a CSP dialect as input. [...] Holzmann reports that β€œPan found its first error in a Bell Labs data-switch control protocol on 21 November 1980.” That dialect may well have been the first CSP language at Bell Labs, and it certainly provided Pike with experience using and implementing a CSP-like language, his first of many. [...] Holzmann's protocol analyzer developed into the Spin model checker and its Promela language.

How cool. Gerard (http://gerard.holzmann.usesthis.com) is now using Spin and several other verification tools to improve source code quality for space missions at JPL. I did not know about this connection of his work to CSP and, indirectly, to Go.

Re:Lightweight concurrency library for C, featuring symmetri... by rubiquity on Friday October 18, 2013 @10:30AM (#6571550)
Wow, excellent link. Thank you for sharing.
Re:Lightweight concurrency library for C, featuring symmetri... by beagle3 on Friday October 18, 2013 @09:59AM (#6571378)
If I am not mistaken, libtask emulates Plan9/Inferno/Limbo, and so does Go.