Re: [c++-pthreads] What are the real issues?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [c++-pthreads] What are the real issues?



On Tue, Jan 06, 2004 at 11:33:47AM -0800, Matt Austern wrote:
> The Itanium C++ ABI, which gcc adopted, made cancellation a special 
> kind of exception, "forced unwinding", so that a thread can't just 
> catch the cancellation exception and swallow it.

This is not correct.  The IA-64 ABI describes "forced unwinding"
but does not describe its semantics at all.  Which is of course
completely unhelpful.

My initial implementation of forced unwinding skipped catch-all,
and ran destructors.  This was vetoed by G++ folks.

The current implementation of forced unwinding is to treat it
just like any other kind of exception.  Almost useless, IMO,
since there's now a high likelyhood that longjmp_unwind will
not arrive at its intended destination.

The current protection against swallowing thread cancellation
(and longjmp_unwind) is done by having the destructor for the
exception object call abort.

> ... we should probably do is abandon the notion of forced unwinding
> and make cancellation into an ordinary exception.

We already have, modulo the fact that the current implementation
has no typename.


r~