[cpp-threads] pthreads cancellation

Jason Merrill jason at redhat.com
Mon May 2 17:44:40 BST 2005


As I recall from those discussions, the solution I liked best for
synchronous cancellation was

1) disable cancellation during unwinding.
2) posix cancellation points throw a cancellation exception, which is a
   normal exception and can be caught and discarded.  If that happens,
   the destructor for the exception object requests cancellation again, and
   a new exception is thrown at the next cancellation point.

Awkwardly, Ulrich Drepper, the GNU libc maintainer, rejects any solution
that involves aborting the cancellation process once it has started.

Jason




More information about the cpp-threads mailing list