Add new thread creation API

Deprecate both g_thread_create functions and add
g_thread_new() and g_thread_new_full(). The new functions
expect a name for the thread.

Change GThreadPool, GMainContext and GDBus to create named threads.

https://bugzilla.gnome.org/show_bug.cgi?id=660635
This commit is contained in:
Matthias Clasen
2011-10-02 10:01:57 -04:00
parent bc67c23bf9
commit 0d1a92ca3d
8 changed files with 91 additions and 36 deletions

View File

@@ -302,10 +302,11 @@ _g_dbus_shared_thread_ref (void)
data->context = g_main_context_new ();
data->loop = g_main_loop_new (data->context, FALSE);
data->thread = g_thread_create (gdbus_shared_thread_func,
data,
TRUE,
&error);
data->thread = g_thread_new ("gdbus",
gdbus_shared_thread_func,
data,
TRUE,
&error);
g_assert_no_error (error);
/* We can cast between gsize and gpointer safely */
g_once_init_leave (&shared_thread_data, (gsize) data);