Refactor to use LockedWrapper guard

This commit is contained in:
2023-09-03 02:01:32 -04:00
parent 4073c88d08
commit e237c28382
7 changed files with 166 additions and 64 deletions

View File

@@ -45,7 +45,7 @@ public:
TSubclassOf<AActor> ClassTangibleActor;
// Transfer console output from the Luprex engine to unreal.
void HandleLuprexConsoleOutput();
void HandleLuprexConsoleOutput(FLockedWrapper &w);
UPROPERTY()
FTangibleManager TangibleManager;
@@ -65,11 +65,9 @@ public:
// to exit.
FEvent* ThreadEvent;
// This critical section guards the use of the EngineWrapper.
FCriticalSection LuprexMutex;
// The Luprex wrapper and engine. MUST CLAIM LuprexMutex.
EngineWrapper Luprex;
// The Luprex EngineWrapper, with a Mutex to protect it.
// To access it, construct a FLockedWrapper.
FLockableWrapper LockableWrapper;
// Luprex socket system. Aside from construction, only touched by Luprex thread.
TUniquePtr<FLpxSockets> Sockets;