Subj : Re: Killing threads To : comp.programming.threads From : Srini Palthepu Date : Tue Aug 16 2005 06:32 pm >>My application has a set of daemon threads for doing the work >>that are alocated for each client request. But when a thread hangs in >>the proces of serving a client for any reason, I need to cleanup. >>I am trying to kill the hung thread and respawn a new one as a way >>of cleaning up. > > > This is a thread pool? yes. > Why not add the logic to the threads to detect a timed out condition and clean > up after themselves? > How do a thread that is blocked doing the work detect timeout? In my case, the main thread gets a reset request from client upon timeout. May be I can send an interrup signal instead of SIGKILL to the thread. thanks Srini .