62 Joining threads
When one thread wants to wait for another thread to complete, it invokes pthread_join. Here is my wrapper for pthread_join:
The parameter is the handle of the thread you want to wait for. All my function does is call pthread_join and check the result.