Creates new thread which runs the given action. The given action will be wrapped so that any exception will be catched and logged.
Namespace: (Default Namespace)Assembly: UnityThreading (in UnityThreading.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C# |
---|
public static ThreadBase CreateThread( Func<IEnumerator> action, bool autoStartThread ) |
Visual Basic |
---|
Public Shared Function CreateThread ( _ action As Func(Of IEnumerator), _ autoStartThread As Boolean _ ) As ThreadBase |
Visual C++ |
---|
public: static ThreadBase^ CreateThread( Func<IEnumerator^>^ action, bool autoStartThread ) |
Parameters
- action
- Type: System..::..Func<(Of <(<'IEnumerator>)>)>
The enumeratable action which the new thread should run.
- autoStartThread
- Type: System..::..Boolean
True when the thread should start immediately after creation.