diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-12-04 21:19:04 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2011-12-04 21:20:07 +0000 |
commit | 8811cbc5aa936f0c960e98596cdebce9ca1d587a (patch) | |
tree | f962e741c4c6051a79c54d76897e2f0ed9d2e784 /libs/gst/check | |
parent | 2666450864d8301e350f4c05eae4f5d25535c377 (diff) |
check: allow non-joinable threads in private g_thread_create() copy
Looks like some tests use non-joinable threads after all.
Diffstat (limited to 'libs/gst/check')
-rw-r--r-- | libs/gst/check/gstcheck.h | 6 |
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 * |