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:
Ryan Lortie
2011-10-13 01:00:57 -04:00
parent 015f4b4513
commit 430c5635f2
26 changed files with 73 additions and 87 deletions

View File

@@ -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);
}