Thread.tryNew
glib.thread.Thread tryNew(string name, glib.types.ThreadFunc func)This function is the same as [glib.thread.Thread.new_] except that it allows for the possibility of failure.
If a thread can not be created (due to resource limits), error is set and null is returned.
Parameters
name | an (optional) name for the new thread |
func | a function to execute in the new thread |
Returns
the new #GThread, or null if an error occurred
Throws
[ThreadException]