![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <TaskConcurrencyLimiter.h>
Public Member Functions | |
| FTaskConcurrencyLimiter (uint32 MaxConcurrency, ETaskPriority TaskPriority=ETaskPriority::Default) | |
| template<typename TaskFunctionType > | |
| void | Push (const TCHAR *DebugName, TaskFunctionType &&TaskFunction) |
| bool | Wait (FTimespan Timeout=FTimespan::MaxValue()) |
A lightweight construct that limits the concurrency of tasks pushed into it.
|
inlineexplicit |
Constructor.
| MaxConcurrency | How wide the processing can go. |
| TaskPriority | Priority the tasks will be launched with. |
|
inline |
Push a new task.
| DebugName | Helps to identify the task in debugger and profiler. |
| TaskFunction | A callable with a slot parameter, usually a lambda but can be also a functor object or a pointer to a function. The slot parameter is an index in [0..max_concurrency) range, unique at any moment of time, that can be used in user code to index a fixed-size buffer. See TaskConcurrencyLimiterStressTest() for an example. |
|
inline |
Waits for task's completion with timeout.
| Timeout | Maximum amount of time to wait for tasks to finish before returning. |