BIND 10 trac2202, updated. a2bcf6e5b22df3c9bed473d342485548c60c8773 [2202] Comment catching of exceptions
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Oct 2 08:54:02 UTC 2012
The branch, trac2202 has been updated
via a2bcf6e5b22df3c9bed473d342485548c60c8773 (commit)
from 408728e4512f08c8e50e3f627cc46eb6ad38a315 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a2bcf6e5b22df3c9bed473d342485548c60c8773
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Tue Oct 2 10:53:10 2012 +0200
[2202] Comment catching of exceptions
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/threads/thread.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/threads/thread.cc b/src/lib/util/threads/thread.cc
index ba3bfc6..3382fe2 100644
--- a/src/lib/util/threads/thread.cc
+++ b/src/lib/util/threads/thread.cc
@@ -144,7 +144,10 @@ Thread::wait() {
// Was there an exception in the thread?
scoped_ptr<UncaughtException> ex;
- try { // Something in here could in theory throw.
+ // Something here could in theory throw. But we already terminated the thread, so
+ // we need to make sure we are in consistent state even in such situation (like
+ // releasing the mutex and impl_).
+ try {
if (impl_->exception_) {
ex.reset(new UncaughtException(__FILE__, __LINE__,
impl_->exception_text_.c_str()));
@@ -152,6 +155,8 @@ Thread::wait() {
} catch (...) {
Impl::done(impl_);
impl_ = NULL;
+ // We have eaten the UncaughtException by now, but there's another
+ // exception instead, so we have at least something.
throw;
}
More information about the bind10-changes
mailing list