tryNew

fun tryNew(name: String? = null, func: ThreadFunc): <Error class: unknown class><Thread>

This function is the same as g_thread_new() except that it allows for the possibility of failure.

If a thread can not be created (due to resource limits),

Return

the new #GThread, or null if an error occurred

Since

2.32

Parameters

name

an (optional) name for the new thread

func

a function to execute in the new thread