Navigation
API > API/Runtime > API/Runtime/TypedElementFramework
A lock-free utility class to collect rows from multiple threads at the same time. Two options are provided:
- Array: Collects all provided row handles without order and can have duplicates. This is usually faster than a set.
- Set: Merges the provided row handles in sorted order and removes duplicates. This is generally slower than an array. Each thread needs to first fill a local row handle array. That list is then passed on to the collector that will combine it with the final list collected from multiple threads. The cost of merging is spread across multiple threads, but as more list contribute some threads will have to merge larger lists than other threads causing an imbalance in thread runtime. The worse case will be the last thread as that will need to merge two arrays that are roughly both half the size of the final array. It's therefor recommended to run with "AutoBalanceParallelChunkProcessing".
| Name | FConcurrentRowHandleCollector |
| Type | class |
| Header File | /Engine/Source/Runtime/TypedElementFramework/Public/Elements/Framework/TypedElementConcurrentRowHandleCollector.h |
| Include Path | #include "Elements/Framework/TypedElementConcurrentRowHandleCollector.h" |
Syntax
template<EConcurrentRowHandleCollectorType Type>
class FConcurrentRowHandleCollector
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FConcurrentRowHandleCollector() |
Elements/Framework/TypedElementConcurrentRowHandleCollector.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| WorkingSet | std::atomic< FRowHandleArray * > | Elements/Framework/TypedElementConcurrentRowHandleCollector.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Append
(
FRowHandleArray&& LocalArray |
Moves the provided array into the collected list by either appending (Array) or uniquely merging (Set). | Elements/Framework/TypedElementConcurrentRowHandleCollector.h | |
bool Collect
(
FRowHandleArray& AccumulatedCollection |
Collect the final results and merge with the provided list. | Elements/Framework/TypedElementConcurrentRowHandleCollector.h |