You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2017/02/13 23:26:53 UTC
thrift git commit: THRIFT-4084: only join threads if joinable Client:
cpp Patch: Chris Grebeldinger
Repository: thrift
Updated Branches:
refs/heads/master b4c190b6e -> 0a660ee28
THRIFT-4084: only join threads if joinable
Client: cpp
Patch: Chris Grebeldinger <cg...@gmail.com>
This closes #1188
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/0a660ee2
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/0a660ee2
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/0a660ee2
Branch: refs/heads/master
Commit: 0a660ee285e4a4cbac8f702168c40fd4ef5495d1
Parents: b4c190b
Author: James E. King, III <jk...@apache.org>
Authored: Mon Feb 13 18:25:56 2017 -0500
Committer: James E. King, III <jk...@apache.org>
Committed: Mon Feb 13 18:25:56 2017 -0500
----------------------------------------------------------------------
lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp | 2 +-
lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/0a660ee2/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
index 6adcb68..8afabf9 100644
--- a/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
+++ b/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
@@ -61,7 +61,7 @@ public:
}
~BoostThread() {
- if (!detached_) {
+ if (!detached_ && thread_->joinable()) {
try {
join();
} catch (...) {
http://git-wip-us.apache.org/repos/asf/thrift/blob/0a660ee2/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
----------------------------------------------------------------------
diff --git a/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp b/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
index 66c7e75..4fca8da 100644
--- a/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
+++ b/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
@@ -61,7 +61,7 @@ public:
}
~StdThread() {
- if (!detached_) {
+ if (!detached_ && thread_->joinable()) {
try {
join();
} catch (...) {