Sets our main struct and passes it to the parent class.
This function is the same as Thread.new except that it allows for the possibility of failure.
A destructor is present on this object, but not explicitly documented in the source.
the main Gtk struct as a void*
Get the main Gtk struct
Waits until thread finishes, i.e. the function func, as given to Thread.new, returns or Thread.exit is called. If thread has already terminated, then Thread.join returns immediately.
Increase the reference count on thread.
Decrease the reference count on thread, possibly freeing all resources associated with it.
Sets the indicated lock_bit in address. If the bit is already set, this call will block until g_bit_unlock() unsets the corresponding bit.
Sets the indicated lock_bit in address, returning TRUE if successful. If the bit is already set, returns FALSE immediately.
Clears the indicated lock_bit in address. If another thread is currently blocked in g_bit_lock() on this same bit then it will be woken up.
Terminates the current thread.
Determine the approximate number of threads that the system will schedule simultaneously for this process. This is intended to be used as a parameter to Thread.poolNew for CPU bound tasks and similar cases.
This is equivalent to g_bit_lock, but working on pointers (or other pointer-sized values).
This is equivalent to g_bit_trylock, but working on pointers (or other pointer-sized values).
This is equivalent to g_bit_unlock, but working on pointers (or other pointer-sized values).
This function returns the glib.Thread corresponding to the current thread. Note that this function does not increase the reference count of the returned struct.
Causes the calling thread to voluntarily relinquish the CPU, so that other threads can run.
the main Gtk struct
The glib.Thread struct represents a running thread. This struct is returned by Thread.new or Thread.tryNew. You can obtain the glib.Thread struct representing the current thread by calling Thread.self.
GThread is refcounted, see Thread.ref and Thread.unref. The thread represented by it holds a reference while it is running, and 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.