Thread.create

This function creates a new thread with the default priority. If joinable is TRUE, you can wait for this threads termination calling g_thread_join(). Otherwise the thread will just disappear when it terminates. The new thread executes the function func with the argument data. If the thread was created successfully, it is returned. error can be NULL to ignore errors, or non-NULL to report errors. The error is set, if and only if the function returns NULL.

class Thread
static
create

Parameters

func GThreadFunc

a function to execute in the new thread.

data void*

an argument to supply to the new thread.

joinable int

should this thread be joinable?

Return Value

Type: Thread

the new GThread on success.

Throws

GException on failure.

Meta