EM_Task/UnrealEd/Private/Commandlets/DDCCleanupCommandlet.cpp

22 lines
627 B
C++
Raw Permalink Normal View History

2026-02-13 16:18:33 +08:00
// Copyright Epic Games, Inc. All Rights Reserved.
#include "Commandlets/DDCCleanupCommandlet.h"
#include "DDCCleanup.h"
#include "HAL/PlatformProcess.h"
int32 UDDCCleanupCommandlet::Main(const FString& Params)
{
if (FDDCCleanup::Get())
{
FDDCCleanup::GetNoInit()->WaitBetweenDeletes(false);
do
{
// Cleanup works from its own thread so just wait until it's done and flush logs once in a while
FPlatformProcess::SleepNoStats(1.0f);
GLog->Flush();
} while (FDDCCleanup::GetNoInit() && !FDDCCleanup::GetNoInit()->IsFinished());
}
return 0;
}