g_thread_create() is deprecated in GLib master, use g_thread_try_new() instead
[glsdk/gstreamer0-10.git] / libs / gst / check / gstcheck.h
index 004eb7457d758a60eb28f71cf68e01c27b8d514f..e77c007bce3783f370ff579e4aa31b4e23dfc7f6 100644 (file)
@@ -277,6 +277,17 @@ MAIN_INIT();                                                       \
 MAIN_START_THREAD_FUNCTIONS(count, function, data);            \
 MAIN_SYNCHRONIZE();
 
+#if GLIB_CHECK_VERSION (2, 31, 0)
+#define g_thread_create gst_g_thread_create
+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);
+}
+#endif
+
 #define MAIN_INIT()                    \
 G_STMT_START {                         \
   _gst_check_threads_running = TRUE;   \