UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
VVMTaskGroup.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#if WITH_VERSE_VM || defined(__INTELLISENSE__)
6
7#include "AutoRTFM.h"
8#include "Containers/Set.h"
9#include "VerseVM/VVMCell.h"
10#include "VerseVM/VVMContext.h"
12#include "VerseVM/VVMTask.h"
14
15namespace Verse
16{
17
18struct VTaskGroup : VCell
19{
22
23 AUTORTFM_OPEN static VTaskGroup& New(FAllocationContext Context)
24 {
25 // We use `DestructorAndCensusSpace` because of ActiveTasks. Its elements are weak and must participate in census, and TSet destruction must occur.
26 // VTaskGroup::New is safe to call from the closed; if an abort occurs, the allocated VTaskGroup can be cleaned up by garbage collection.
27 return *new (Context.Allocate(FHeap::DestructorAndCensusSpace, sizeof(VTaskGroup))) VTaskGroup(Context);
28 }
29
31 AUTORTFM_OPEN COREUOBJECT_API bool HasActiveTasks() const;
32
34 AUTORTFM_OPEN COREUOBJECT_API int64 GetNumActive() const;
35
37 AUTORTFM_DISABLE COREUOBJECT_API bool AddTask(FAllocationContext, VTask& Task);
38
40 AUTORTFM_DISABLE COREUOBJECT_API bool RemoveTask(FAllocationContext, VTask& Task);
41
43 /*AUTORTFM_DISABLE*/ COREUOBJECT_API bool AddTaskTransactionally(FAllocationContext, VTask& Task);
44
46 /*AUTORTFM_DISABLE*/ COREUOBJECT_API bool RemoveTaskTransactionally(FAllocationContext, VTask& Task);
47
50
51private:
52 AUTORTFM_OPEN VTaskGroup(FAllocationContext Context)
54 {
55 }
56
58
60
62};
63
64} // namespace Verse
65
66#endif // WITH_VERSE_VM
#define AUTORTFM_DISABLE
Definition AutoRTFMDefines.h:116
#define AUTORTFM_OPEN
Definition AutoRTFMDefines.h:122
FPlatformTypes::int64 int64
A 64-bit signed integer.
Definition Platform.h:1127
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
T * New(FMemStackBase &Mem, int32 Count=1, int32 Align=DEFAULT_ALIGNMENT)
Definition MemStack.h:259
FORCEINLINE T * Get(const FObjectPtr &ObjectPtr)
Definition ObjectPtr.h:426
Definition Archive.h:36