Stop HGCU_thread_run as the first task of MySQL_HostGroups_Manager destructor #1299

pull/1336/head
René Cannaò 8 years ago
parent 60a3cab0f4
commit b3de6f7ae6

@ -382,6 +382,8 @@ MySQL_HostGroups_Manager::MySQL_HostGroups_Manager() {
}
MySQL_HostGroups_Manager::~MySQL_HostGroups_Manager() {
queue.add(NULL);
HGCU_thread->join();
while (MyHostGroups->len) {
MyHGC *myhgc=(MyHGC *)MyHostGroups->remove_index_fast(0);
delete myhgc;
@ -391,8 +393,6 @@ MySQL_HostGroups_Manager::~MySQL_HostGroups_Manager() {
if (admindb) {
delete admindb;
}
queue.add(NULL);
HGCU_thread->join();
#ifdef MHM_PTHREAD_MUTEX
pthread_mutex_destroy(&lock);
#endif

Loading…
Cancel
Save