Only joining threads if they are created
This commit is contained in:
parent
30d5a3b8a5
commit
2ff85a5a60
@ -101,9 +101,11 @@ ClangCompleter::~ClangCompleter() {
|
|||||||
sorting_threads_.interrupt_all();
|
sorting_threads_.interrupt_all();
|
||||||
sorting_threads_.join_all();
|
sorting_threads_.join_all();
|
||||||
|
|
||||||
|
if ( clang_thread_ ) {
|
||||||
clang_thread_->interrupt();
|
clang_thread_->interrupt();
|
||||||
clang_thread_->join();
|
clang_thread_->join();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// We need this mostly so that we can not use it in tests. Apparently the
|
// We need this mostly so that we can not use it in tests. Apparently the
|
||||||
|
@ -103,9 +103,11 @@ IdentifierCompleter::~IdentifierCompleter() {
|
|||||||
query_threads_.interrupt_all();
|
query_threads_.interrupt_all();
|
||||||
query_threads_.join_all();
|
query_threads_.join_all();
|
||||||
|
|
||||||
|
if ( buffer_identifiers_thread_ ) {
|
||||||
buffer_identifiers_thread_->interrupt();
|
buffer_identifiers_thread_->interrupt();
|
||||||
buffer_identifiers_thread_->join();
|
buffer_identifiers_thread_->join();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// We need this mostly so that we can not use it in tests. Apparently the
|
// We need this mostly so that we can not use it in tests. Apparently the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user