Search Results for

    Show / Hide Table of Contents

    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, uint32 stackSize = 0)

    Starts a new thread the specified callback.

    Declaration
    public static Thread* Start(const Function<int32()>& callback, const String& threadName, ThreadPriority priority=ThreadPriority::Normal, uint32 stackSize = 0)
    Parameters
    Function<int32()> callback

    The callback function.

    String threadName

    Name of the thread.

    ThreadPriority priority

    The thread priority.

    uint32 stackSize

    The size of the stack to create. 0 means use the current thread's stack size

    Returns
    Thread

    The created thread.

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