Which thread library should I use for multi-threaded Linux programs?

I did streams in Java, but I am a complete noob for streams in C. My first question, after some Google users: Which library of streams do I use? Does it matter? I seem to have thread.h and pthread.h .

OS - this will be Linux. In particular, this is Ubuntu at the moment and will either remain so or become RHEL. But I suppose the distribution does not matter?

+6
c multithreading linux
source share
2 answers

POSIX Thread Libraries ( pthread.h ) is a standards-based API for C / C ++, and this is what I will use. There are also several tutorials, such as this or this .

I admit that I am not familiar with thread.h .

+11
source share

The standard interface thread on POSIX systems such as linux is pthread for a POSIX thread.

+1
source share

All Articles