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:
@@ -426,7 +426,6 @@ static void
|
||||
setup_with_thread_loop (Test *test,
|
||||
gconstpointer user_data)
|
||||
{
|
||||
GError *error = NULL;
|
||||
ThreadLoop closure;
|
||||
|
||||
setup_without_loop (test, user_data);
|
||||
@@ -437,7 +436,7 @@ setup_with_thread_loop (Test *test,
|
||||
closure.test = test;
|
||||
|
||||
g_mutex_lock (&closure.loop_mutex);
|
||||
test->loop_thread = g_thread_new ("loop", thread_loop, &closure, &error);
|
||||
test->loop_thread = g_thread_new ("loop", thread_loop, &closure);
|
||||
while (!closure.started)
|
||||
g_cond_wait (&closure.loop_started, &closure.loop_mutex);
|
||||
g_mutex_unlock (&closure.loop_mutex);
|
||||
|
Reference in New Issue
Block a user