Limen Framework 0.1 Help

FThreadedFunction

Overview

FThreadedFunction is a class derived from FRunnable, designed to simplify multithreading in Unreal Engine. It takes a lambda function as an argument and runs it on a separate thread, providing a straightforward way to perform background tasks without blocking the main game thread.

Properties

Type

Name

Access

Description

TFunction<void()>

Function

Private

The lambda function to be executed on a separate thread.

TFunction<void()>

StopCallback

Private

A callback function that is called when the thread stops.

Functions

Return Type

Signature

Description

uint32

Run()

Executes the lambda function and returns a success code.

void

Stop()

Calls the stop callback function to clean up resources before stopping the thread.

Usage & Implementation Notes

  • The class is designed for use in scenarios where background tasks need to be performed without blocking the main game thread.

  • The Run method executes the provided lambda function, and the Stop method ensures that any necessary cleanup is done before the thread stops.

  • This utility can be used in various parts of the application where multithreading is required for performance optimization or responsiveness.

22 May 2026