Class ThreadPoolActionTask
General purpose task executing custom action using Thread Pool.
Assembly: FlaxEngine.dll
File: Engine/Threading/ThreadPoolTask.h
Syntax
public class ThreadPoolActionTask : public ThreadPoolTask
Constructors
ThreadPoolActionTask(const Function<bool()>& action, Object* target=nullptr)
Initializes a new instance of the ThreadPoolActionTask class.
Declaration
public ThreadPoolActionTask(const Function<bool()>& action, Object* target=nullptr)
Parameters
Function<bool()>
action
The action. |
Object
target
The target object. |
ThreadPoolActionTask(const Function<void()>& action, Object* target=nullptr)
Initializes a new instance of the ThreadPoolActionTask class.
Declaration
public ThreadPoolActionTask(const Function<void()>& action, Object* target=nullptr)
Parameters
Function<void()>
action
The action. |
Object
target
The target object. |
ThreadPoolActionTask(Function<bool()>::Signature action, Object* target=nullptr)
Initializes a new instance of the ThreadPoolActionTask class.
Declaration
public ThreadPoolActionTask(Function<bool()>::Signature action, Object* target=nullptr)
Parameters
Function<bool()>::Signature
action
The action. |
Object
target
The target object. |
ThreadPoolActionTask(Function<void()>::Signature action, Object* target=nullptr)
Initializes a new instance of the ThreadPoolActionTask class.
Declaration
public ThreadPoolActionTask(Function<void()>::Signature action, Object* target=nullptr)
Parameters
Function<void()>::Signature
action
The action. |
Object
target
The target object. |
Fields
_action1
Declaration
protected Function<void()> _action1
Field Value
Function<void()>
|
_action2
Declaration
protected Function<bool()> _action2
Field Value
Function<bool()>
|
_target
Methods
HasReference(Object* obj)
Determines whether the specified object has reference to the given object.
Declaration
public virtual bool HasReference(Object* obj) const override
Parameters
Object
obj
The object. |
Returns
bool
True if the specified object has reference to the given object, otherwise false. |
Overrides
Run()
Runs the task specified operations. It does not handle any task related logic, but only performs the actual job.
Declaration
protected virtual bool Run() override
Returns
bool
The task execution result. Returns true if failed, otherwise false. |