Use g_thread_try_new() instead of g_thread_create()
authorPhilip Chimento <philip.chimento@gmail.com>
Sat, 31 Aug 2013 21:07:08 +0000 (14:07 -0700)
committerPhilip Chimento <philip.chimento@gmail.com>
Sat, 31 Aug 2013 23:54:14 +0000 (16:54 -0700)
g_thread_create() was deprecated in GLib 2.32. We don't use
g_thread_new() because the program should not abort if the thread
could not be created; rather, it should display an error message
and refuse to start the game.

libchimara/chimara-glk.c

index dd057e6923b942054c27616254fb22bfbaa1e319..793c6e8fbf15f018959ab1fa5d0893cacd235dc2 100644 (file)
@@ -1297,8 +1297,8 @@ chimara_glk_run(ChimaraGlk *glk, const gchar *plugin, int argc, char *argv[], GE
        g_object_notify(G_OBJECT(glk), "program-name");
        
     /* Run in a separate thread */
-       priv->thread = g_thread_create((GThreadFunc)glk_enter, startup, TRUE, error);
-       
+       priv->thread = g_thread_try_new("glk", (GThreadFunc)glk_enter, startup, error);
+
        return !(priv->thread == NULL);
 }