Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
The runnable mechanical wrapping. More...
#include <CommonChain.h>
Public Member Functions | |
auto | GetOwner () const |
Get the owning chain of the runnable. | |
TCommonRunnableMechanic (const ChainT *const InOwner, const bool bInConcurrent=false) | |
Initialize a new runnable mechanic instance. | |
~TCommonRunnableMechanic () override | |
Finalize the mechanic runnable. | |
Public Member Functions inherited from FCommonChain::FCommonRunnableMechanic | |
bool | ShouldStop () const |
void | Stop () override |
auto | HasFinished () const |
Check if the runnable has finished its execution. | |
EApparatusStatus | Halt (bool bShouldWait=true) |
Halt the execution of the runnable on its thread. | |
EApparatusStatus | WaitForCompletion () |
Wait for the mechanic to complete. | |
FCommonRunnableMechanic (const bool bInConcurrent) | |
Initialize the base mechanic. | |
~FCommonRunnableMechanic () override | |
Protected Member Functions | |
void | DoBeginRun () |
This must be executed within a new thread's context, which is always within a solid mechanism. | |
void | DoEndRun () |
This must be executed within a new thread context. | |
uint32 | Run () override |
EApparatusStatus | DoLaunchAsync (int32 InId) |
Launch the asynchronous execution. | |
Protected Attributes | |
const ChainT * | Owner = nullptr |
The owner of the runnable. | |
Protected Attributes inherited from FCommonChain::FCommonRunnableMechanic | |
bool | bConcurrent = false |
Is the runnable asynchronous (concurrent). | |
FRunnableThread * | Thread = nullptr |
The executing thread. | |
std::atomic< bool > | bStop {false} |
Manual stop signal. | |
std::atomic< bool > | bFinished {false} |
Has the runnable finished executing. | |
The runnable mechanical wrapping.
Can be run both in the main and parallel threads.
The wrapping is also used in the context of usual single-threaded operating as a wrapper.
|
inline |
Initialize a new runnable mechanic instance.
InOwner | The owning mechanic to operate. May actually be a nullptr . |
bInConcurrent | Should the mechanic run as part of a concurrent workflow. |
|
inlineoverride |
Finalize the mechanic runnable.
|
protected |
This must be executed within a new thread's context, which is always within a solid mechanism.
|
protected |
This must be executed within a new thread context.
|
inlineprotected |
Launch the asynchronous execution.
The thread is created automatically.
InId | The unique identifier of the thread. |
|
inline |
Get the owning chain of the runnable.
|
inlineoverrideprotected |
|
protected |
The owner of the runnable.