Thread.this

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.

  1. this(GThread* gThread, bool ownedRef)
  2. this(string name, GThreadFunc func, void* data)
    class Thread
    this
    (
    string name
    ,,
    void* data
    )

Parameters

name string

an (optional) name for the new thread

func GThreadFunc

a function to execute in the new thread

data void*

an argument to supply to the new thread

Return Value

the new #GThread, or %NULL if an error occurred

Throws

GException on failure. ConstructionException GTK+ fails to create the object.

Meta

Since

2.32