Thread

class Thread(pointer: <Error class: unknown class><<Error class: unknown class>>) : Record

The #GThread struct represents a running thread. This struct is returned by g_thread_new() or g_thread_try_new(). You can obtain the #GThread struct representing the current thread by calling g_thread_self().

GThread is refcounted, see g_thread_ref() and g_thread_unref(). The thread represented by it holds a reference while it is running, and g_thread_join() consumes the reference that it is given, so it is normally not necessary to manage GThread references explicitly.

The structure is opaque -- none of its fields may be directly accessed.

Skipped during bindings generation

  • method join: Return type gpointer is unsupported

  • constructor new: C function g_thread_new is ignored

  • constructor try_new: C function g_thread_try_new is ignored

  • parameter retval: gpointer

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion : RecordCompanion<Thread, <Error class: unknown class>>

Properties

Link copied to clipboard
val glibThreadPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun ref(): Thread

Increase the reference count on @thread.

Link copied to clipboard
fun unref()

Decrease the reference count on @thread, possibly freeing all resources associated with it.