[c++-pthreads] Re: pthread_cancel and EH: let's try this again

George Shimanovich gshiman at commvault.com
Fri Jul 15 16:22:17 UTC 2005


>Jason Merrill [jason at redhat.com] wrote:
>And the current status quo in GCC:
>3) #1, except that the destructor for the exception calls abort().
Additional inelegant possibilities for the destructor 
>would be killing just the thread, throwing a new exception, or doing
nothing (leaving the thread in a sort of zombie 
>state).
>From the point of view of mere mortal, why GCC implementation calls
abort()? Unusable better describes current GCC implementation then
'status quo' as instead of terminating cancelled thread entire program
is aborted. Unless signal handler does not return, of course, - but that
is unacceptable for thread pool implementations where threads need to be
reused. Why not kill the thread in that case? That way cancelled thread
will go away which is what cancellation is supposed to do.

George Shimanovich
CommVault Systems, Inc.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/c++-pthreads/attachments/20050715/ecf9a65e/attachment.html>


More information about the c++-pthreads mailing list