Pthread thread condition

Is there a mechanism that I can use to determine if a pthread thread is running or exiting? Is there a way for pthread_join () that can expire after a certain period of time if the thread has not yet exited?

+3
source share
2 answers

I just finished migrating a stream in a C ++ class and saved a state variable that can be checked later.

+2
source

Source: https://habr.com/ru/post/1716646/


All Articles