create


Description:

[ Version ( deprecated_since = "2.32" , replacement = "new Thread<T> ()" ) ]
[ CCode ( simple_generics = true ) ]
public static unowned Thread<T> create<T> (owned ThreadFunc<T> func, bool joinable) throws ThreadError

Warning: create is deprecated since 2.32. Use new Thread ().

This function creates a new thread.

Note:

Use Thread instead

The new thread executes the function func with the argument data. If the thread was created successfully, it is returned.

throws can be null to ignore errors, or non-null to report errors. The error is set, if and only if the function returns null.

This function returns a reference to the created thread only if joinable is true. In that case, you must free this reference by calling g_thread_unref or join. If joinable is false then you should probably not touch the return value.

Parameters:

func

a function to execute in the new thread

joinable

should this thread be joinable?

data

an argument to supply to the new thread

Returns:

the new Thread on success