Hi, this is my first post!
Ok, I've been reading some articles on pthreads and there's one thing that doesn't make sense to me. Why would you want to "join" threads. Doesn't that defeat the purpose of a thread? From what I understood, joining a thread stops execution of the calling thread, but isn't the point of creating a thread to allow for multiple things to be done "at the same time?" That seems to defeat the purpose, although I'm sure there's a reason for it :P. Then, in another example, it creates some threads and joins them, but it's an example to show the use of mutexes...if only one thread is running then what's the point of protecting data.
I think the part I've gotten wrong is what joining the threads does...I'd assumed that it singled out all threads except the specified one, but I'm now thinking that it may apply only to the calling thread. If this is true, then what is a practical application of joining a thread?