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: asynchronous cancellation


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

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