Subj : Re: list of all threads( pthread_t's ) in process To : comp.programming.threads From : David Schwartz Date : Tue Sep 27 2005 05:04 am "shex" wrote in message news:1127817752.824466.267120@g47g2000cwa.googlegroups.com... > I'm using pthread library, is there a way of getting all pthread_id of > all my siblings threads (in my process)? There is no standard, portable way. There may or may not be a platform-specific way. For what it's worth, I can't think of anything you could do with the information safely other than count the number of threads. For example, suppose you get an indication that a particular pthread_id is on that list. There are two possibilities. Either you already knew for sure that that pthread_id was in use, in which case it tells you nothing you didn't already know, or that pthread_id could refer to anything, including a thread that ended before you had a chance to look at the pthread_id. In either case, how does it help you? You can't use the pthread_id for anything because it may no longer be valid. DS .