Navigation
API > API/Plugins > API/Plugins/MediaIOCore
Class to ensure that async tasks execute any critical path in order. It works like clients at a shop getting a number, waiting for their turn, and when they are done they give up their turn so that the next number can be serviced. Its functions can be called from any thread.
| Name | FOrderedAsyncGate |
| Type | class |
| Header File | /Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Public/OrderedAsyncGate.h |
| Include Path | #include "OrderedAsyncGate.h" |
Syntax
class FOrderedAsyncGate
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CurrentNumber | std::atomic< uint32 > | The current number that has its turn without having to wait any longer | OrderedAsyncGate.h | |
| NextNumber | std::atomic< uint32 > | The number that will be given out to the next client that calls GetANumber | OrderedAsyncGate.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
uint64 GetANumber() |
Gets a number that represents the when the number holder will get their turn. | OrderedAsyncGate.h | |
void GiveUpTurn
(
const uint32 Number |
Call this function when you are ready to give up your turn. | OrderedAsyncGate.h | |
bool IsMyTurn
(
const uint32 Number |
Returns true if it is the turn of the given number | OrderedAsyncGate.h | |
void WaitForTurn
(
const uint32 Number |
This function will block until it is the turn of the given number to execute. | OrderedAsyncGate.h |