Thread.tryNew

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), error is set and NULL is returned. Since 2.32

class Thread
static
tryNew
(
string name
,,
void* data
)

Parameters

name string

an (optional) name for the new thread. [allow-none]

func GThreadFunc

a function to execute in the new thread

data void*

an argument to supply to the new thread

Return Value

Type: Thread

the new GThread, or NULL if an error occurred

Throws

GException on failure.

Meta