This is the mail archive of the
pthreads-win32@sourceware.cygnus.com
mailing list for the pthreas-win32 project.
Re: asynchronous cancellation
- To: Ross Johnson <rpj at ise dot canberra dot edu dot au>
- Subject: Re: asynchronous cancellation
- From: Jason Nye <jnye at nbnet dot nb dot ca>
- Date: Wed, 17 Nov 1999 08:47:00 -0400
- CC: 'Pthreads-win32' <pthreads-win32 at sourceware dot cygnus dot com>
- References: <Pine.LNX.4.05.9911171352420.256-100000@swan.canberra.edu.au>
Just thought I'd point out a mistake I made in my code I showed you. The
if (::WaitForSingleObject(hThread, 0) != WAIT_TIMEDOUT)
line should be
if (::WaitForSingleObject(hThread, 0) == WAIT_TIMEDOUT)
You want to time out on the wait -- it means the thread is still
running.
Cheers.
Jason