This is the mail archive of the
pthreads-win32@sourceware.cygnus.com
mailing list for the pthreas-win32 project.
cancelation problem
- To: 'Pthreads-win32' <pthreads-win32 at sourceware dot cygnus dot com>
- Subject: cancelation problem
- From: Erik Hensema <erik dot hensema at group2000 dot nl>
- Date: Mon, 8 Nov 1999 11:19:17 +0100
Hi,
I'm investigating a problem regarding thread cancelation. The thread I want
to cancel has PTHREAD_CANCEL_ASYNCHRONOUS, however, this piece of code
blocks on the join():
if ((retv = Pthread_cancel( recvThread )) == 0)
{
retv = Pthread_join( recvThread, 0 );
}
Pthread_* are just macro's; they call pthread_*.
The thread recvThread seems to block on a select() call. It doesn't get
cancelled.
Two questions:
1) is this normal behaviour?
2) if not, how does the cancel mechanism work? I'm not very familliar to
win32 programming, so I don't really understand how the *Event() family of
calls work.
--
Erik Hensema
Work: erik.hensema@group2000.nl
Home: erik@hensema.xs4all.nl