This is the mail archive of the
pthreads-win32@sourceware.cygnus.com
mailing list for the pthreas-win32 project.
RE: cancelation problem
- Subject: RE: cancelation problem
- From: Erik Hensema <erik dot hensema at group2000 dot nl>
- Date: Wed, 10 Nov 1999 08:40:30 +0100
- Cc: 'Pthreads-win32' <pthreads-win32 at sourceware dot cygnus dot com>
> -----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.
>