[cpp-threads] Re: Exception propogation across threads
Howard Hinnant
howard.hinnant at gmail.com
Thu Feb 22 21:13:44 GMT 2007
On Feb 22, 2007, at 4:04 PM, Peter Dimov wrote:
> Howard Hinnant wrote in message c++std-ext-8619:
>
>> A low-level std::thread (or whatever name) does not deliver results
>> of
>> any kind: normal or abnormal. Unhandled exceptions (except possibly
>> thread_cancel)
>
> And thread_exit, thrown by pthread_exit.
Sounds reasonable.
>> result in a call to std::terminate() (which may have a
>> handler by current C++03 rules). Trying to join with a canceled
>> thread is a sure-fire technique for dead-locking a thread. This
>> provides good motivation for keeping the handle of such a std::thread
>> non-copyable.
>
> Joins are well-defined for a canceled thread; they operate exactly
> as joins for non-canceled threads do, wait until the thread has been
> terminated, then return. I don't see where your deadlock comes from.
My bad, thanks for the correction. That's even better.
-Howard
More information about the cpp-threads
mailing list