Results 1 to 2 of 2
Hi everybody,
I wan to use pthread_cancel to cancel a thread, but before do that thing i want to check that thread was created or is it running?
I dont ...
- 09-05-2011 #1Just Joined!
- Join Date
- Sep 2011
- Posts
- 1
Check a created thread
Hi everybody,
I wan to use pthread_cancel to cancel a thread, but before do that thing i want to check that thread was created or is it running?
I dont find out the function to check status of a thread.
How can i do that, please help me.
Thanks.
- 09-06-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
Why not just cancel the thread ID? It will return the ESRCH error if the thread has either not been created or if it is no longer running.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote