Subj : Re: Killing threads To : comp.programming.threads From : Ian Date : Wed Aug 17 2005 12:32 pm Srini Palthepu wrote: >>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. > Block on something that has a timeout associated with it, for example if you are forking, use a pipe to communicate with the child and use poll or select with a timeout to wait for data. Ian .