UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Zenaphore.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7class FZenaphore;
8
10{
12 bool bTriggered = false;
13};
14
16{
17public:
22
24
25 void Wait();
26
27private:
28 friend class FZenaphore;
29
30 void WaitInternal();
31
32 FZenaphore& Outer;
33 FZenaphoreWaiterNode WaiterNode;
34 int32 SpinCount = 0;
35};
36
38{
39public:
40 FZenaphore();
42 void NotifyOne();
43 void NotifyAll();
44
45private:
46 friend class FZenaphoreWaiter;
47
48 void NotifyInternal(FZenaphoreWaiterNode* Waiter);
49
50 FEvent* Event;
51 FCriticalSection Mutex;
52 TAtomic<FZenaphoreWaiterNode*> HeadWaiter { nullptr };
53};
54
FPlatformTypes::TCHAR TCHAR
Either ANSICHAR or WIDECHAR, depending on whether the platform supports wide characters or the requir...
Definition Platform.h:1135
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE::FPlatformRecursiveMutex FCriticalSection
Definition CriticalSection.h:53
Definition Event.h:21
Definition Zenaphore.h:16
~FZenaphoreWaiter()
Definition Zenaphore.cpp:60
FZenaphoreWaiter(FZenaphore &Outer, const TCHAR *WaitCpuScopeName)
Definition Zenaphore.h:18
void Wait()
Definition Zenaphore.cpp:82
Definition Zenaphore.h:38
void NotifyOne()
Definition Zenaphore.cpp:27
~FZenaphore()
Definition Zenaphore.cpp:13
FZenaphore()
Definition Zenaphore.cpp:8
void NotifyAll()
Definition Zenaphore.cpp:44
Definition Atomic.h:538
Definition Zenaphore.h:10
bool bTriggered
Definition Zenaphore.h:12
FZenaphoreWaiterNode * Next
Definition Zenaphore.h:11