UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GenericPlatformMutex.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Misc/Timespan.h"
7
8namespace UE
9{
10
16template <class MutexType>
18{
19public:
22
25
27 {
28 return Mutex.TryLock();
29 }
30
32 {
33 Mutex.Lock();
34 }
35
37 {
38 Mutex.Unlock();
39 }
40
42 {
43 return Mutex.TryLock();
44 }
45
47 {
48 Mutex.Lock();
49 }
50
52 {
53 Mutex.Unlock();
54 }
55
56private:
57 MutexType Mutex;
58};
59
88
89} // UE
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition GenericPlatformMutex.h:62
FPlatformSystemWideMutexNotImplemented & operator=(const FPlatformSystemWideMutexNotImplemented &)=delete
bool IsValid() const
Definition GenericPlatformMutex.h:78
FPlatformSystemWideMutexNotImplemented(const FPlatformSystemWideMutexNotImplemented &)=delete
void Release()
Definition GenericPlatformMutex.h:84
Definition GenericPlatformMutex.h:18
UE_FORCEINLINE_HINT bool TryLockShared()
Definition GenericPlatformMutex.h:41
TGenericPlatformSharedMutex(const TGenericPlatformSharedMutex &)=delete
UE_FORCEINLINE_HINT void UnlockShared()
Definition GenericPlatformMutex.h:51
UE_FORCEINLINE_HINT void LockShared()
Definition GenericPlatformMutex.h:46
UE_FORCEINLINE_HINT void Lock()
Definition GenericPlatformMutex.h:31
TGenericPlatformSharedMutex & operator=(const TGenericPlatformSharedMutex &)=delete
UE_FORCEINLINE_HINT void Unlock()
Definition GenericPlatformMutex.h:36
UE_FORCEINLINE_HINT bool TryLock()
Definition GenericPlatformMutex.h:26
Definition AdvancedWidgetsModule.cpp:13
Definition Timespan.h:76
static FTimespan Zero()
Definition Timespan.h:747