[cpp-threads] Re: Exception propogation across threads
Peter Dimov
pdimov at mmltd.net
Thu Feb 22 21:04:03 GMT 2007
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.
> 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.
More information about the cpp-threads
mailing list