static gpointer
glk_enter(struct StartupData *startup)
{
- extern GPrivate *glk_data_key;
- g_private_set(glk_data_key, startup->glk_data);
+ extern GPrivate glk_data_key;
+ g_private_set(&glk_data_key, startup->glk_data);
/* Acquire the Glk thread's references to the input queues */
g_async_queue_ref(startup->glk_data->char_input_queue);
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);
}