Thread: pthread's - check for running thread

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    722

    pthread's - check for running thread

    To create a thread one uses pthread_create. To terminate it, pthread_cancel, to wait for it's termination pthread_join... but how do we check if a thread has exit, (or not) by it's id, without blocking on the function's call ?
    In windows it would be WaitForSignleObject(thread_handle,0)
    Last edited by xErath; 05-29-2005 at 01:03 PM.

  2. #2

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    the cleanup stuff gave me a good ideia.. instead of calling the thread function, I'll call my own function which calls the thread function. And mine will then signal a var.
    Thank you

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. allegro issues
    By mramazing in forum C++ Programming
    Replies: 1
    Last Post: 01-07-2009, 11:56 PM
  2. Replies: 2
    Last Post: 07-01-2007, 07:11 AM
  3. Messaging Between Threads, Exiting Thread On Demand, Etc.
    By HyperShadow in forum C++ Programming
    Replies: 10
    Last Post: 06-09-2007, 01:04 PM
  4. C++ Threading?
    By draggy in forum C++ Programming
    Replies: 5
    Last Post: 08-16-2005, 12:16 PM
  5. Replies: 12
    Last Post: 05-17-2003, 05:58 AM