Subj : Re: pthread function behavior in C++ program To : comp.programming.threads From : Chris Vine Date : Sat Jun 11 2005 06:10 pm David Butenhof wrote: [snip] > If you expect to be working exclusively with a C++ implementation that > exposes cancellation as exceptions, then you definitely should use the > native C++ mechanisms instead of pthread_cleanup_push/pop. On some > implementations (e.g., Tru64 UNIX and OpenVMS), the C macros won't even > work correctly (or possibly at all) from C++ (they're based language > extensions to integrate with the native platform exceptions that the C++ > compiler doesn't support). How far down the stack is an exception thrown by virtue of a call to pthread_cancel() expected to go in a well-designed system, for those which expose cancellations as exceptions (as I believe NPTL now does when executing in a C++ environment). Should it propagate to the point at which the thread ceases executing (terminate the thread), or should it go further? If it tries to propagate beyond that point I can't see it could do much more than terminate the whole process within which it was executing. Chris -- To reply by e-mail remove the --nospam-- in the address. .