Re: [c++-pthreads] Re: FW: RE: Re: I'm Lost
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [c++-pthreads] Re: FW: RE: Re: I'm Lost



David Abrahams wrote:

Mark Mitchell <mark@xxxxxxxxxxxxxxxx> writes:

I don't think we should support unstoppable exceptions at all.
Silently rethrowing at the end of a catch handler breaks too many
important invariants.

Usually, yes.  Unfortunately that position is not much of a
compromise: it doesn't give an inch to the other side. If we allow a
generalized thread_throw then there's nothing we can do to stop people
from building unstoppable exceptions and throwing them across the
thread boundary, but to do so they'll have to write some tricky and
non-obvious code.  I'm hoping that's enough for people like us to say
"don't do that: you get what you deserve when you write code like
that" and for other people to say "I'm satisfied that I _can_ get the
thread to stop once we hit a cancellation point with cancel enabled."

So who/where is this alledged "other side"? IMHO, one of the inspiring things in the discussion we've been witnessing here in the last couple of days is that no one, not even David B., is actually arguing in favor of unstoppable cancellation exceptions. (Mark mentioned Ulrich Drepper's glibc implementation; we all know what he did, but so far, I haven't found any explanation *why* he did that).

It seems to me that, before phantasising about any sort of compromise with the "other side", we would need to know what the other side is after, and why.

- Wil