We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f94635c commit cf240bfCopy full SHA for cf240bf
boost/network/protocol/http/client/async_impl.hpp
@@ -74,7 +74,9 @@ struct async_client
74
void wait_complete() {
75
sentinel_.reset();
76
if (lifetime_thread_.get()) {
77
- lifetime_thread_->join();
+ if (lifetime_thread_->joinable() && lifetime_thread_->get_id() != std::this_thread::get_id()) {
78
+ lifetime_thread_->join();
79
+ }
80
lifetime_thread_.reset();
81
}
82
boost/network/utils/thread_group.hpp
@@ -55,7 +55,7 @@ class thread_group {
55
std::unique_lock<std::mutex> guard(m);
56
57
for (auto &thread : threads) {
58
- if (thread->joinable()) {
+ if (thread->joinable() && thread->get_id() != std::this_thread::get_id()) {
59
thread->join();
60
61
0 commit comments