mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 00:12:19 +01:00 
			
		
		
		
	thread creation: Simplify error handling
Instead of always returning non-NULL and finding out about errors via the GError*, return NULL from the backend in the event of an error.
This commit is contained in:
		| @@ -1111,8 +1111,9 @@ g_system_thread_new (GThreadFunc   thread_func, | ||||
|   if (ret == EAGAIN) | ||||
|     { | ||||
|       g_set_error (error, G_THREAD_ERROR, G_THREAD_ERROR_AGAIN,  | ||||
| 		   "Error creating thread: %s", g_strerror (ret)); | ||||
|       return thread; | ||||
|                    "Error creating thread: %s", g_strerror (ret)); | ||||
|       g_slice_free (GRealThread, thread); | ||||
|       return NULL; | ||||
|     } | ||||
|  | ||||
|   posix_check_err (ret, "pthread_create"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user