MT#61977 move cleanup of notifiers

Destroy thread pool only after everything is finished using it

Change-Id: Iab8667b3a80aaf43581b19b03ff6191dfe69c8d6
pull/1998/head
Richard Fuchs 5 months ago
parent 74bc521eab
commit 09c87d5464

@ -166,9 +166,9 @@ static void wait_for_signal(void) {
static void cleanup(void) {
notify_cleanup();
garbage_collect_all();
metafile_cleanup();
notify_cleanup();
inotify_cleanup();
epoll_cleanup();
mysql_library_end();

@ -301,8 +301,6 @@ void notify_setup(void) {
}
void notify_cleanup(void) {
if (notify_threadpool)
g_thread_pool_free(notify_threadpool, true, false);
if (notify_waiter && notify_timers) {
// get lock, free GTree, signal thread to shut down
pthread_mutex_lock(&timer_lock);
@ -311,6 +309,9 @@ void notify_cleanup(void) {
pthread_cond_signal(&timer_cond);
pthread_mutex_unlock(&timer_lock);
}
if (notify_threadpool)
g_thread_pool_free(notify_threadpool, true, false);
notify_threadpool = NULL;
}
__attribute__ ((format (printf, 2, 3)))

Loading…
Cancel
Save