pthread_cancel and EH: let's try this again
Alexander Terekhov
terekhov at web.de
Tue Jul 19 08:04:56 UTC 2005
Wil Evers wrote:
>
> Alexander Terekhov wrote:
> > Wil Evers wrote:
> > [...]
> >
> >>X::~X()
> >>{
> >> try {
> >> cancellation_manager enabler(true);
> >> some_blocking_operation();
> >> } catch (const cancellation & ex) {
> >> // log ex
> >> // don't rethrow
> >> }
> >>}
> >
> >
> > Nope. It will break X's client logic relying on modularity of X in the
> > sense of its capability to defer cancellation and perform cancelable
> > effects (subject any other failure modes, if any) when cancellation is
> > been disabled by X's client.
>
> You've lost me. Maybe you're assuming that a cancellation request will
> only cause a single cancellation exeception, in other words, that
> cancellation is not "sticky"?
When cancellation is been disabled by X's client, it doesn't matter
whether cancellation is "sticky" or not "sticky" because it's been
suppressed entirely by X's client.
regards,
alexander.
More information about the c++-pthreads
mailing list