Re:Go-style concurrency in C
by stefantalpalaru on Wednesday November 18, 2015 @08:05AM
(#10587434)
It looks like the Linux port of libdispatch uses OS threads through pthreads, so it's not a candidate for the user space light-weight threads needed for efficient CSP.
• You don't need to use blocks, there are function callback versions of the calls available, but blocks are nicer.
• There are asynchronous IO routines, that covers most of your stalls.
• Go probably stalls threads on page faults, as does libdispatch.
You can read about the Linux port of libdispatch at https://github.com/nickhutchinson/libdispatch