#define g_cond_signal(cond) g_compat_cond_signal(cond)
#undef g_cond_wait
#define g_cond_wait(cond, mutex) g_compat_cond_wait(cond, mutex)
+
+#undef g_thread_try_new
+#define g_thread_try_new(name, func, data, error) \
+ g_compat_thread_try_new(name, func, data, error)
+
+static inline GThread *
+g_compat_thread_try_new(const gchar *name, GThreadFunc func, gpointer data,
+ GError **error)
+{
+ return g_thread_create(func, data, TRUE, error);
+}
#endif
#if !GLIB_CHECK_VERSION(2,31,18)
g_timer_start(app->timer);
- app->decoder_thread = g_thread_create(decoder_thread, app, TRUE, NULL);
+ app->decoder_thread = g_thread_try_new("Decoder Thread", decoder_thread,
+ app, NULL);
if (!app->decoder_thread)
return FALSE;
return TRUE;
static gboolean
start_renderer(App *app)
{
- app->render_thread = g_thread_create(renderer_thread, app, TRUE, NULL);
+ app->render_thread = g_thread_try_new("Renderer Thread", renderer_thread,
+ app, NULL);
if (!app->render_thread)
return FALSE;
return TRUE;