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

@@ -134,12 +134,14 @@ GLIB_VAR gboolean g_threads_got_initialized;
GMutex* g_static_mutex_get_mutex_impl (GMutex **mutex);
GThread *g_thread_create (GThreadFunc func,
GThread *g_thread_new (const gchar *name,
GThreadFunc func,
gpointer data,
gboolean joinable,
GError **error);
GThread *g_thread_create_with_stack_size (GThreadFunc func,
GThread *g_thread_new_full (const gchar *name,
GThreadFunc func,
gpointer data,
gboolean joinable,
gsize stack_size,