summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-12-04 21:19:04 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-12-04 21:20:07 +0000
commit8811cbc5aa936f0c960e98596cdebce9ca1d587a (patch)
treef962e741c4c6051a79c54d76897e2f0ed9d2e784
parent2666450864d8301e350f4c05eae4f5d25535c377 (diff)
check: allow non-joinable threads in private g_thread_create() copy
Looks like some tests use non-joinable threads after all.
-rw-r--r--libs/gst/check/gstcheck.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/gst/check/gstcheck.h b/libs/gst/check/gstcheck.h
index 46bf6c542..5e3f99504 100644
--- a/libs/gst/check/gstcheck.h
+++ b/libs/gst/check/gstcheck.h
@@ -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 *