Subj : Re: Application hangs in pthread_join To : comp.programming.threads From : David Schwartz Date : Fri Mar 18 2005 11:54 am "Jeff" wrote in message news:1111174330.253947.253910@f14g2000cwb.googlegroups.com... >> The question is, what is the thread it's waiting for doing? And >> why do >> you need so many threads? > It's an http regression tester. In this case, it's simulating 500 web > browsers. I'm having trouble debugging the waiting threads. It's either > waiting for the webserver or I didn't properly handle an error. You really didn't answer either question. You don't need 500 threads to simulate 500 browsers. You need 500 instances of a state machine. >> > x = our.total_clients; >> > while(x){ >> > pthread_join(peer[x--], &statusp); <= hangs here! >> > } >> >> The question is, what is the other thread doing? > > You mean the main thread? It's waiting for pthread_join. No, what is the thread it's waiting for doing? Use the debugging tools on your platform to figure out what that other thread is doing. DS .