Re:Show HN: Chan – pure C implementation of Go channels
by readerrrr on Friday August 29, 2014 @08:35PM
(#8245163)
I agree, OP could have used the C11 feature, <threads.h>
Re:Show HN: Chan – pure C implementation of Go channels
by DSMan195276 on Friday August 29, 2014 @10:59PM
(#8245474)
To be fair, you'll probably have better luck finding people who can compile it if you use pthreads.h vs. threads.h. IIRC glibc doesn't have threads.h implemented, and I don't know of any C standard libraries that do. pthreads is fairly universal even if it's not standard C, and at the very least it's much more universal then threads.h is at the moment.
Re:Show HN: Chan – pure C implementation of Go channels
by justincormack on Saturday August 30, 2014 @04:32AM
(#8245949)
Musl libc will have one in the next release it seems. It is the only one I know of.
Re:Show HN: Chan – pure C implementation of Go channels
by jevinskie on Saturday August 30, 2014 @08:17AM
(#8246243)
Correct, I was just going to chime in about this. Musl is very impressive with its compact size, correctness, Drepper-less-ness =P, and speed of implementing new standards.
That is not "pure C". "pthread.h" (POSIX threads) is not part of the C language standard, it is a system-specific header commonly found on UNIX systems. Windows has a different threading system for example.