From: Joonbum Ko Date: Wed, 5 Jan 2022 07:48:11 +0000 (+0900) Subject: Remove finalizer source to before cond_signal X-Git-Tag: submit/tizen/20220118.102333~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F60%2F268960%2F1;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Remove finalizer source to before cond_signal Change-Id: Iaeb1b75ecff8860f10f82a21e8ea2be972e70dad Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_utils_gthread.c b/src/tpl_utils_gthread.c index 51a6dc7..0c3b203 100644 --- a/src/tpl_utils_gthread.c +++ b/src/tpl_utils_gthread.c @@ -187,9 +187,12 @@ _thread_source_dispatch(GSource *source, GSourceFunc cb, gpointer data) g_mutex_lock(&thread->thread_mutex); __gsource_remove_and_destroy(del_source); + __gsource_remove_and_destroy(gsource); g_cond_signal(&thread->thread_cond); g_mutex_unlock(&thread->thread_mutex); + + return G_SOURCE_REMOVE; } } } @@ -201,8 +204,7 @@ _thread_source_dispatch(GSource *source, GSourceFunc cb, gpointer data) gsource, gsource->fd, cond); } - if (gsource->type == SOURCE_TYPE_DISPOSABLE || - gsource->type == SOURCE_TYPE_FINALIZER) { + if (gsource->type == SOURCE_TYPE_DISPOSABLE) { g_mutex_lock(&thread->thread_mutex); __gsource_remove_and_destroy(gsource); ret = G_SOURCE_REMOVE;