Search Results for

    Show / Hide Table of Contents

    Class SimpleRunnable

    Simple runnable object for single function bind

    Inheritance
    Object
    IRunnable
    SimpleRunnable
    Inherited Members
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    IRunnable::Exit()
    Object::Flags
    IRunnable::Init()
    Object::OnDeleteObject()
    IRunnable::Stop()
    IRunnable::~IRunnable()
    Object::~Object()
    Assembly: FlaxEngine.dll
    File: Engine/Threading/IRunnable.h
    Syntax
    public class SimpleRunnable : public IRunnable

    Constructors

    SimpleRunnable(bool autoDelete)

    Init

    Declaration
    public SimpleRunnable(bool autoDelete)
    Parameters
    bool autoDelete

    True if delete itself after work.

    Fields

    OnWork

    Working function

    Declaration
    public Function<int32()> OnWork
    Field Value
    Function<int32()>

    Methods

    AfterWork(bool wasKilled)

    Called when thread ends work (via Kill or normally).

    Declaration
    public virtual void AfterWork(bool wasKilled) override
    Parameters
    bool wasKilled

    True if thread has been killed.

    Overrides
    IRunnable::AfterWork(bool wasKilled)

    Run()

    Executes the runnable object.

    Declaration
    public virtual int32 Run() override
    Returns
    int32

    The exit code. Non-zero on error.

    Overrides
    IRunnable::Run()

    ToString()

    Gets the string representation of this object.

    Declaration
    public virtual String ToString() const override
    Returns
    String

    Overrides
    Object::ToString()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat