I know that the implementation of threads in the Linux kernel and libc has gone through major changes in the past. What is the best way to use streams today from C programs? (I donβt even know if there are several APIs that I can use - I just know pthreads)
I donβt care about the old versions of the kernel and libc, but I care about using multiple cores efficiently and about portability (I want my code to work with other Unix as well).
If I just use Posix threads as described in man 7 pthreads and restrict my POSIX API code, would that be ok?
edit : thanks to everyone who answers. I really thought of using some available thread pool library, but for this project this is really not an option.
source share