Navigation
Unreal Engine C++ API Reference > Runtime > Core > Tasks
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Tasks/Pipe.h |
Include | #include "Tasks/Pipe.h" |
Syntax
class FPipe
Remarks
A chain of tasks that are executed one after another. Can be used to synchronise access to a shared resource as FPipe guarantees non-concurrent tasks execution. FPipe is a replacement for named threads because it's lightweight and flexible - there can be a large dynamic number of pipes each controlling its own shared resource. Can be used as a replacement for dedicated threads. Execution order is FIFO, i.e. it's the same as launching order. This means that if launching order is unspecified A pipe must be alive until its last task is completed. See `FTasksPipeTest_ for tests and examples.
Constructors
Destructors
Type | Name | Description | |
---|---|---|---|
![]() |
~FPipe () |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
const TCHAR * | GetDebugName () |
|
![]() ![]() |
bool | HasWork () |
Returns `true_ if the pipe has any not completed tasks |
![]() ![]() |
bool | IsInContext () |
Checks if pipe's task is being executed by the current thread. |
![]() |
TTask< TInvokeResult_T< TaskBodyType > > | Launch
(
const TCHAR* InDebugName, |
Launches a task in the pipe |
![]() |
TTask< TInvokeResult_T< TaskBodyType > > | Launch
(
const TCHAR* InDebugName, |
Launches a task in the pipe, with multiple prerequisites that must be completed before the task is scheduled |
![]() |
bool | WaitUntilEmpty
(
FTimespan Timeout |
Waits until the pipe is empty (its last task is executed) should be used only after no more tasks are launched in the pipe, e.g. preparing for the pipe destruction |