Files
UnrealEngineUWP/Engine/Source/Runtime/RuntimeAssetCache/Private/RuntimeAssetCacheBucketScopeLock.h
Ben Marsh 530369c613 Merging //UE4/Dev-Main to Dev-Build (//UE4/Dev-Build)
#rb none
#rnx

[CL 4662695 by Ben Marsh in Dev-Build branch]
2018-12-14 14:49:12 -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;
};