I'm learning pthreads in c++. I've stucked at some point and searched on the web, however the same sentence exists in all pages, however not any explanation about this sentence. I couldn't understand the below sentence.
A joining thread can match one pthread_join() call. It is a logical error to attempt multiple joins on the same thread.
It is from this link : http://www.bogotobogo.com/cplusplus/multithreading_pthread.php
Could you explain what this sentence mean? Could you explain what the logical error is by an example?
What is "joining thread"? Say that, Main thread creates a child thread, main thread waits for child thread to complete its job. OK. in this case, which one is the joining thread , main thread or child thread?