399 Subj : asynchronous cancel vs calling pthread_exit in signal handler To : comp.unix.programmer,comp.programming.threads From : Dave Date : Fri Apr 22 2005 11:48 am I'm a newbie in MT programming and I've been reading PwPT about cancelling the execution of a thread. I'm writing a database application which calls some 3rd party library to send SQL queries to the database but sometimes the database is not responsive and I would like to interrupt the call. Sending a signal doesn't interrupt the call every time so I would like to cancel/terminate the thread (deferred cancel doesn't work either). >From what I've read it seems that asynchronous cancel is definitely something that I shouldn't use. but I came across a suggestion of calling pthread_exit() in the signal handler, I wonder if that's just as dangerous as using asynchronous cancel? Any help is appreciated. Thanks in advance. . 0