[cpp-threads] pthreads cancellation

Lawrence Crowl crowl at philmont.eng.sun.com
Tue Apr 26 21:09:23 BST 2005


"Boehm, Hans" <hans.boehm at hp.com> writes:
 >(I think there is a (near ?) consensus that we can ignore Posix
 >asynchronous cancellation.  I would suggest we not go there.)

I'm a little unclear on whether that means "not ignoring" or
"ignoring".

There are two problems with thread cancellation.

First, it is asynchronous.  The exception tables have to be robust
enough to handle any instruction pointer.  More importantly, any
optimizations between two function calls may change the program
behavior in the event of a cancellation, where they would not
otherwise.

Second, it is unpredictable.  We can do substantial optimization when
we know that a function cannot throw.  With cancellation, we can never
know that it cannot throw.

  Lawrence Crowl             650-786-6146   Sun Microsystems, Inc.
                   Lawrence.Crowl at Sun.com   16 Network Circle, UMPK16-303
           http://www.Crowl.org/Lawrence/   Menlo Park, California, 94025




More information about the cpp-threads mailing list