Companion

object Companion

Functions

Link copied to clipboard
fun create(func: ThreadFunc, joinable: Boolean): <Error class: unknown class><Thread>

This function creates a new thread.

Link copied to clipboard
fun createFull(func: ThreadFunc, stackSize: <Error class: unknown class>, joinable: Boolean, bound: Boolean, priority: ThreadPriority): <Error class: unknown class><Thread>

This function creates a new thread.

Link copied to clipboard
fun errorQuark(): <Error class: unknown class>
Link copied to clipboard
fun exit(retval: <Error class: unknown class>? = null)

Terminates the current thread.

Link copied to clipboard
fun foreach(threadFunc: Func)

Call @thread_func on all #GThreads that have been created with g_thread_create().

Link copied to clipboard

Indicates if g_thread_init() has been called.

Link copied to clipboard
fun getType(): <Error class: unknown class>

Get the GType of Thread

Link copied to clipboard
fun init(vtable: <Error class: unknown class>? = null)

If you use GLib from more than one thread, you must initialize the thread system by calling g_thread_init().

Link copied to clipboard
fun initWithErrorcheckMutexes(vtable: <Error class: unknown class>? = null)
Link copied to clipboard
fun new(name: String? = null, func: ThreadFunc): Thread

This function creates a new thread. The new thread starts by invoking

Link copied to clipboard
fun self(): Thread

This function returns the #GThread corresponding to the current thread. Note that this function does not increase the reference count of the returned struct.

Link copied to clipboard
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.

Link copied to clipboard
fun yield()

Causes the calling thread to voluntarily relinquish the CPU, so that other threads can run.