check: allow non-joinable threads in private g_thread_create() copy
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 4 Dec 2011 21:19:04 +0000 (21:19 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 4 Dec 2011 21:20:07 +0000 (21:20 +0000)
Looks like some tests use non-joinable threads after all.

libs/gst/check/gstcheck.h

index 46bf6c5..5e3f995 100644 (file)
@@ -283,8 +283,10 @@ static inline GThread *
 gst_g_thread_create (GThreadFunc func, gpointer data, gboolean joinable,
     GError **error)
 {
-  g_assert (joinable);
-  return g_thread_try_new ("gst-check", func, data, error);
+  GThread *thread = g_thread_try_new ("gst-check", func, data, error);
+  if (!joinable)
+    g_thread_unref (thread);
+  return thread;
 }
 #define g_mutex_new gst_g_mutex_new
 static inline GMutex *