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]

cancelation problem


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

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