[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Figuring out the state of a thread
Hi all,
For my implementation, I need to create new threads, let them run for a
little while and die, and then keep creating new ones. Given that I cannot
dynamically allocate memory within the RT context, I was thinking about
having an array of pthread_ts, and cycling through it picking the first
inactive thread when I needed a new one to create. But I cannot figure out
how to find out, knowing only the thread handle, whether a thread is still
alive (in which case I would want to leave it alone). Any suggestions?
Thanks,
Pablo Alvarez