mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-24 18:08:54 +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:
@@ -289,10 +289,8 @@ main (int argc,
|
||||
if (cancel_timeout)
|
||||
{
|
||||
GThread *thread;
|
||||
|
||||
cancellable = g_cancellable_new ();
|
||||
thread = g_thread_new ("cancel", cancel_thread, cancellable, NULL);
|
||||
g_assert (thread != NULL);
|
||||
thread = g_thread_new ("cancel", cancel_thread, cancellable);
|
||||
g_thread_unref (thread);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user