UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ThreadID.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if (defined(__AUTORTFM) && __AUTORTFM)
6
7#include "AutoRTFM.h"
8
9#include <thread>
10
11namespace AutoRTFM
12{
13
14// A unique identifier for a thread of execution.
15// Constructed as FThreadID::Invalid.
16struct FThreadID
17{
18 // An invalid thread identifier.
20
21 // Returns the currently executing thread's unique identifier.
23 static FThreadID GetCurrent();
24
25 // Equality operator
26 inline bool operator == (const FThreadID& Other) const
27 {
28 return Value == Other.Value;
29 }
30
31 // Inequality operator
32 inline bool operator != (const FThreadID& Other) const
33 {
34 return Value != Other.Value;
35 }
36
37 std::thread::id Value;
38};
39
40}
41
42#endif // (defined(__AUTORTFM) && __AUTORTFM)
#define UE_AUTORTFM_API
Definition AutoRTFMDefines.h:156
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_FORCEINLINE_HINT bool operator!=(const FIndexedPointer &Other) const
Definition LockFreeList.h:76
Definition API.cpp:57