Class ThreadSpawner
Helper class to spawn custom thread for performing long-time action. Don't use it for short tasks.
Inheritance
ThreadSpawner
Assembly: FlaxEngine.dll
File: Engine/Threading/ThreadSpawner.h
Syntax
public class ThreadSpawner
Methods
Start(const Function<int32()>& callback, const String& threadName, ThreadPriority priority=ThreadPriority::Normal)
Starts a new thread the specified callback.
Declaration
public static Thread* Start(const Function<int32()>& callback, const String& threadName, ThreadPriority priority=ThreadPriority::Normal)
Parameters
Function<int32()>
callback
The callback function. |
String
threadName
Name of the thread. |
ThreadPriority
priority
The thread priority. |
Returns
Thread
The created thread. |