mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
g_thread_new: never fail
Remove the GError argument from g_thread_new() and abort on failure. Introduce g_thread_try() for those who want to handle failure.
This commit is contained in:
@@ -936,16 +936,11 @@ static void
|
||||
test_dispatch (const gchar *object_path)
|
||||
{
|
||||
GThread *thread;
|
||||
GError *error;
|
||||
|
||||
/* run this in a thread to avoid deadlocks */
|
||||
error = NULL;
|
||||
thread = g_thread_new ("test_dispatch",
|
||||
test_dispatch_thread_func,
|
||||
(gpointer) object_path,
|
||||
&error);
|
||||
g_assert_no_error (error);
|
||||
g_assert (thread != NULL);
|
||||
(gpointer) object_path);
|
||||
g_main_loop_run (loop);
|
||||
g_thread_join (thread);
|
||||
}
|
||||
|
Reference in New Issue
Block a user