Search Results for

    Show / Hide Table of Contents

    Class ThreadPoolActionTask

    General purpose task executing custom action using Thread Pool.

    Inheritance
    Object
    Task
    ThreadPoolTask
    ThreadPoolActionTask
    Inherited Members
    Task::_cancelFlag
    Task::_continueWith
    Task::_state
    Task::Cancel()
    Task::CancelAll(Array<T* , AllocationType>& tasks)
    Task::ContinueWith(Task* task)
    Task::ContinueWith(const Action& action, Object* target=nullptr)
    Task::ContinueWith(const Function<void()>& action, Object* target=nullptr)
    Task::ContinueWith(const Function<bool()>& action, Object* target=nullptr)
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    ThreadPoolTask::Enqueue()
    Task::Execute()
    Object::Flags
    Task::GetContinueWithTask()
    Task::GetState()
    Task::IsCanceled()
    Task::IsCancelRequested()
    Task::IsEnded()
    Task::IsFailed()
    Task::IsFinished()
    Task::IsQueued()
    Task::IsRunning()
    NonCopyable::NonCopyable()
    NonCopyable::NonCopyable(const NonCopyable& )
    Task::OnCancel()
    Object::OnDeleteObject()
    Task::OnEnd()
    Task::OnFail()
    Task::OnFinish()
    Task::OnStart()
    NonCopyable::operator=(const NonCopyable& )
    Task::SetState(TaskState state)
    Task::Start()
    Task::StartNew(Task* task)
    Task::StartNew(const Function<void()>& action, Object* target=nullptr)
    Task::StartNew(Function<void()>::Signature action, Object* target=nullptr)
    Task::StartNew(T* callee)
    Task::StartNew(const Function<bool()>& action, Object* target=nullptr)
    Task::StartNew(Function<bool()>::Signature& action, Object* target=nullptr)
    ThreadPoolTask::ThreadPoolTask()
    ThreadPoolTask::ToString()
    Task::Wait(const TimeSpan& timeout)
    Task::Wait(double timeoutMilliseconds=-1)
    Task::WaitAll(const Span<Task* >& tasks, double timeoutMilliseconds=-1)
    Task::WaitAll(const Array<T* , AllocationType>& tasks, double timeoutMilliseconds=-1)
    Object::~Object()
    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

    Declaration
    protected Object* _target
    Field Value
    Object

    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
    Task::HasReference(Object* obj)

    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.

    Overrides
    Task::Run()

    See Also

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat