GThread *thread;
GError *error = NULL;
- thread = g_thread_new ("test", thread1_func, NULL, &error);
+ thread = g_thread_try ("test", thread1_func, NULL, &error);
g_assert_no_error (error);
result = g_thread_join (thread);
gpointer result;
GThread *thread;
- thread = g_thread_new ("test", thread2_func, NULL, NULL);
+ thread = g_thread_new ("test", thread2_func, NULL);
g_assert (g_thread_self () != thread);
g_error ("prlimit failed: %s\n", g_strerror (ret));
error = NULL;
- thread = g_thread_new ("a", thread1_func, NULL, &error);
+ thread = g_thread_try ("a", thread1_func, NULL, &error);
g_assert (thread == NULL);
g_assert_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN);
g_error_free (error);