This is the mail archive of the pthreads-win32@sourceware.cygnus.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: cancelation problem



> -----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.

> 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]