pthread_cancel and EH: let's try this again
Alexander Terekhov
terekhov at web.de
Wed Jul 13 15:28:50 UTC 2005
Jason Merrill wrote:
[...]
> while (true)
> try
> {
> body();
> }
> catch (...)
> {
> recover();
> }
>
> Under the old non-EH implementation this thread cancelled properly.
You mean with omitted recovery? That's hardly "properly".
Cancel-unaware code is not meant to be canceled.
It's as simply as that.
while (true)
try
{
body();
}
catch (...)
{
recover();
handle_thread_termination_request(); /* http://tinyurl.com/8q3qt */
}
regards,
alexander.
More information about the c++-pthreads
mailing list