UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PThreadsRecursiveMutex.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5// HEADER_UNIT_UNSUPPORTED - Unsupported platform
6
7#include "CoreTypes.h"
8
9#if PLATFORM_USE_PTHREADS
10
11#include <pthread.h>
12#include <errno.h>
13
14namespace UE
15{
16
23{
24public:
26 FPThreadsRecursiveMutex& operator=(const FPThreadsRecursiveMutex&) = delete;
27
29 {
35 }
36
38 {
40 }
41
42 UE_FORCEINLINE_HINT bool TryLock()
43 {
44 return pthread_mutex_trylock(&Mutex) == 0;
45 }
46
48 {
49 pthread_mutex_lock(&Mutex);
50 }
51
52 UE_FORCEINLINE_HINT void Unlock()
53 {
55 }
56
57private:
59};
60
61} // UE
62
63#endif // PLATFORM_USE_PTHREADS
#define UE_FORCEINLINE_HINT
Definition Platform.h:723
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FRWLock Lock
Definition UnversionedPropertySerialization.cpp:921
UE::FRecursiveMutex Mutex
Definition MeshPaintVirtualTexture.cpp:164
Definition AdvancedWidgetsModule.cpp:13