Navigation
API > API/Runtime > API/Runtime/Engine
A Tick function that can be used to execute a set of arbitrary work. This can be used as a normal tick function or passed to the work request functions. This is NOT threadsafe on it's own, it needs to be protected by something like the locks in SendQueuedWork to use from multiple threads.
| Name | FWorkQueueTickFunction |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/TaskSyncManager.h |
| Include Path | #include "TaskSyncManager.h" |
Syntax
struct FWorkQueueTickFunction : public FTickFunction
Inheritance Hierarchy
- FTickFunction → FWorkQueueTickFunction
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWorkQueueTickFunction() |
TaskSyncManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FWorkQueueTickFunction() |
TaskSyncManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AddWork
(
FWorkFunction&& Work |
Try to add a new function to the queue | TaskSyncManager.h | |
void ClearWork() |
Clear the queue, not allowed if execution has started | TaskSyncManager.h | |
void ExecuteWork() |
Actually execute the work, also called by execute tick if this scheduled as a normal tick | TaskSyncManager.h | |
bool HasQueuedWork() |
Return true if any work has been queued | TaskSyncManager.h | |
bool IsQueueOpen() |
Return true if work can be added to the queue | TaskSyncManager.h | |
bool IsWorkExecuting() |
Return true if this is currently executing, if so no work can be added to the queue | TaskSyncManager.h | |
void SetClearAfterExecute
(
bool bShouldClear |
Sets if it should clear the queue after every execution (default behavior) | TaskSyncManager.h | |
| Sets the debug name used by DiagnosticContext | TaskSyncManager.h | ||
void SetOpenAfterExecute
(
bool bShouldOpen |
Sets if it should reopen a closed queue after every execution (default behavior) | TaskSyncManager.h | |
void SetQueueOpen
(
bool bShouldBeOpen |
Explicitly close or open the queue, can be used to finalize before execution | TaskSyncManager.h |
Protected
Overridden from FTickFunction
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FName DiagnosticContext
(
bool bDetailed |
Function to give a 'context' for this tick, used for grouped active tick reporting | TaskSyncManager.h | |
virtual FString DiagnosticMessage () |
Abstract function to describe this tick. | TaskSyncManager.h | |
virtual void ExecuteTick
(
float DeltaTime, |
Abstract function actually execute the tick. Batched tick managers should use ExecuteNestedTick | TaskSyncManager.h |