From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Hensema To: egcs@cygnus.com Cc: 'Pthreads-win32' Subject: RE: cancelation problem Date: Tue, 09 Nov 1999 23:41:00 -0000 Message-id: X-SW-Source: 1999/msg00127.html > -----Original Message----- > From: Ross Johnson [ mailto:rpj@ise.canberra.edu.au ] > The thread I want > > to cancel has PTHREAD_CANCEL_ASYNCHRONOUS, however, this > piece of code > > blocks on the join(): [...] > > The thread recvThread seems to block on a select() call. It > doesn't get > > cancelled. > [...] > Pthreads-win32 doesn't support asynchronous cancelation, only > deferred, which is also very limited. The reason there is no async > cancelation is that it's very hard, if not impossible, to implement > on top of Win32. Ok, thank you for your explaination. I have solved the problem by adding a timeout to the select() call, and looping it infinitely. The thread cancelation now works as it should. >