mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-31 05:14:11 +02:00
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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user