shibai
asked on
Wait for a thread to exit for limited time on linux
Using pthread_join(), one could wait for another thread to exit. But the pthread_join does not take a time argument, so if the other thread gets stuck and doesn't exit, the pthread_join doesn't return. Is there a way to wait for a limited time, say 5 seconds? If the other thread doesn't exit, then the calling thread could continue its own journey. Thanks a lot.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.