Files
UnrealEngineUWP/Engine/Source/Runtime/RuntimeAssetCache/Private/RuntimeAssetCacheBucketScopeLock.h
Thomas Sarkanen 8ba3c4c087 Merging //UE4/Dev-Main to Dev-Anim (//UE4/Dev-Anim) @ CL 4643671
#rb none
#jira none

[CL 4665410 by Thomas Sarkanen in Dev-Anim branch]
2018-12-17 06:31:16 -05:00

29 lines
574 B
C++

// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "RuntimeAssetCacheBucket.h"
/*
* Scope lock guarding RuntimeAssetCache bucket metadata critical section.
**/
class FRuntimeAssetCacheBucketScopeLock
{
public:
FRuntimeAssetCacheBucketScopeLock(FRuntimeAssetCacheBucket& InBucket)
: Bucket(InBucket)
{
Bucket.MetadataCriticalSection.Lock();
}
~FRuntimeAssetCacheBucketScopeLock()
{
Bucket.MetadataCriticalSection.Unlock();
}
private:
/** Bucket to protect. */
FRuntimeAssetCacheBucket& Bucket;
};