Method run.thread(+ 1 overload)
Overload
Starts new thread: creates new System.Threading.Thread object, sets some properties and calls System.Threading.Thread.Start.
public static Thread thread(Action threadProc, bool background = true, bool sta = true)
Parameters
|
threadProc (Action)
Thread procedure. Parameter start of Thread constructor. |
|
background (bool)
If |
|
sta (bool)
If |
Returns
|
Thread
The Thread variable. |
Exceptions
Overload(top)
Starts new thread like thread(Action, bool, bool) and gets thread handle and native id.
public static SafeWaitHandle thread(out int id, out Thread thread, Action threadProc, bool background = true, bool sta = true, Action init = null)
Parameters
|
id (int)
Native thread id. |
|
thread (Thread)
Thread object. |
|
threadProc (Action)
Thread procedure. Parameter start of Thread constructor. |
|
background (bool)
If |
|
sta (bool)
If |
|
init (Action)
Called in the new thread before threadProc. This function (run.thread) waits until it returns. |
Returns
|
SafeWaitHandle
Thread handle. Don't forget to dispose. |