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>
Mon, 9 Sep 2013 04:12:01 +0000 (21:12 -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 337cfa5fce112326e50b4349b0b696c8bb050b6e..33c64e8642d62fb34338fa7c3808bdcd63cedd9d 100644 (file)
@@ -1236,8 +1236,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);
 }