[c++-pthreads] cancellation points report failure
Ben Hutchings
ben.hutchings at businesswebsoftware.com
Mon Dec 29 16:08:02 UTC 2003
David Abrahams <dave at boost-consulting.com> wrote:
<snip>
> It seems to me that it should be up to the cancelling thread to decide
> whether it wants to take drastic measures to ensure that cancellation
> happens. The only effective way I can think of to do that is to do
> allow synchronous cancellation requests with a timeout that forces
> thread termination if it fails to respond... but I'm sure there are
> other approaches.
What you seem to be suggesting is to convert a synchronous cancellation
into an asynchronous cancellation. I don't see how this can be safe.
If a calling thread is to be allowed to set a time limit on cancellation
then I think the time-out action should to be to terminate the process.
However, I'm not convinced that programmers are generally very good at
setting time limits.
More information about the c++-pthreads
mailing list