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]

The FAQ (was: RE: Activity on this list)


> -----Original Message-----
> From: Ross Johnson [mailto:rpj@ise.canberra.edu.au]
[....]
> A new snapshot should be out soon but if you have access to the CVS
> repository and don't mind building the library from source you can
> get the latest as of yesterday. This includes Jason Nye's async
> cancelation and some other improvements. I have one or two other
> contributions to incorporate before the next snapshot which will
> definitely be out in the next couple of days.

It sure looks good (I only browsed the code, didn't compile it).

However, the FAQ was updated with a question about cancellation I asked  on
this list, and while the question is still valid, the answer is outdated by
the recent changes in cancellation (it mentiones async cancels don't work,
while they in most cases do now).

So, the answer to Q4 should be something like:

"Pthreads-win32 only partially supports asynchronous cancellation. If the
thread you're trying to cancel is blocked (for instance, it could be waiting
for data from the network), it will only get cancelled when it unblocks
(when the data arrives). Unfortunately, there is no way to do so from
outside the thread."

> PS. I like to try to only commit tested code to the CVS main branch,
> and the latest changes have passed the expanded test suite, so
> grabbing the sources from the repository shouldn't be too risky.
> 

I bet it won't cancel this code:

HANDLE h=CreateEvent(...);
WaitForSingleObject(h, INFINITE);

Where the event never gets signalled.

However, I'm still not sure if this is Posixly correct behaviour: Posix only
specifies the thread should be canceled ASAP, but possible==never in this
case...

> 

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