Re: [c++-pthreads] Restating the Jason model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [c++-pthreads] Restating the Jason model



On 12 Jan 2004 12:51:21 -0800, Mark Mitchell <mark@xxxxxxxxxxxxxxxx> wrote:
> On Mon, 2004-01-12 at 12:39, Jason Merrill wrote:

> I believe that I would support all elements of your proposal, with the
> possible exception of:
>
>> My preference is still to amend the C++ standard to allow stdio functions
>> to throw cancellation.
>
> However, I don't see that as a particularly big deal one way or the
> other.  The observation has already been made that the goal of
> preserving existing C++ code is probably incompatible with introducing
> cancellation, although Nathan's ETHREADCANCELLED idea is designed to get
> around that.

As others have pointed out, the ECANCELLED idea doesn't work; i/o calls
from cleanup code would also fail with ECANCELLED, so (some of) the cleanup
wouldn't actually happen.

Failing that, if we want cancellation to abort blocked stdio calls, we need
to allow them to throw.

Jason