Only joining threads if they are created
This commit is contained in:
parent
30d5a3b8a5
commit
2ff85a5a60
@ -101,8 +101,10 @@ ClangCompleter::~ClangCompleter() {
|
|||||||
sorting_threads_.interrupt_all();
|
sorting_threads_.interrupt_all();
|
||||||
sorting_threads_.join_all();
|
sorting_threads_.join_all();
|
||||||
|
|
||||||
clang_thread_->interrupt();
|
if ( clang_thread_ ) {
|
||||||
clang_thread_->join();
|
clang_thread_->interrupt();
|
||||||
|
clang_thread_->join();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,8 +103,10 @@ IdentifierCompleter::~IdentifierCompleter() {
|
|||||||
query_threads_.interrupt_all();
|
query_threads_.interrupt_all();
|
||||||
query_threads_.join_all();
|
query_threads_.join_all();
|
||||||
|
|
||||||
buffer_identifiers_thread_->interrupt();
|
if ( buffer_identifiers_thread_ ) {
|
||||||
buffer_identifiers_thread_->join();
|
buffer_identifiers_thread_->interrupt();
|
||||||
|
buffer_identifiers_thread_->join();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user