Browse Source

MT#61977 move cleanup of notifiers

Destroy thread pool only after everything is finished using it

Change-Id: Iab8667b3a80aaf43581b19b03ff6191dfe69c8d6
pull/1998/head
Richard Fuchs 4 months ago
parent
commit
09c87d5464
2 changed files with 4 additions and 3 deletions
  1. +1
    -1
      recording-daemon/main.c
  2. +3
    -2
      recording-daemon/notify.c

+ 1
- 1
recording-daemon/main.c View File

@ -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();


+ 3
- 2
recording-daemon/notify.c View File

@ -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