glib:remove self-join deadlock:change to g_thread_unref 80/89880/1 accepted/tizen/common/20160927.152907 accepted/tizen/ivi/20160928.050508 accepted/tizen/mobile/20160928.050413 accepted/tizen/tv/20160928.050428 accepted/tizen/wearable/20160928.050451 submit/tizen/20160927.110227
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 27 Sep 2016 09:28:51 +0000 (18:28 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 27 Sep 2016 09:28:56 +0000 (18:28 +0900)
Change-Id: I1b98bed183510ca79c3448da5e2bd2a4115de709
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
gio/gkdbus.c

index 41435be..51c7f89 100755 (executable)
@@ -587,16 +587,6 @@ _g_kdbus_quit_loop (gpointer loop)
   return FALSE;
 }
 
-static gboolean
-_g_kdbus_thread_end (gpointer thread)
-{
-  GThread *gthread = (GThread *)thread;
-
-  g_thread_join (gthread);
-
-  return FALSE;
-}
-
 /*
  * _g_kdbus_close
  */
@@ -615,10 +605,7 @@ _g_kdbus_close (GKDBusWorker *worker)
 
   g_main_loop_unref (worker->loop);
 
-  if (g_thread_self() == worker->thread)
-    g_main_context_invoke (NULL, _g_kdbus_thread_end, worker->thread);
-  else
-    g_thread_join (worker->thread);
+  g_thread_unref(worker->thread);
 
   worker->thread = NULL;