You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira #rb none #ROBOMERGE-OWNER: ryan.vance #ROBOMERGE-AUTHOR: ben.marsh #ROBOMERGE-SOURCE: CL 5993252 via CL 5993257 via CL 5995286 via CL 5995562 #ROBOMERGE-BOT: DEVVR (Main -> Dev-VR) [CL 6004844 by ben marsh in Dev-VR branch]
44 lines
678 B
C++
44 lines
678 B
C++
// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreTypes.h"
|
|
#include "Windows/MinimalWindowsApi.h"
|
|
#include "LC_Platform.h"
|
|
|
|
class CriticalSection
|
|
{
|
|
public:
|
|
CriticalSection(void);
|
|
~CriticalSection(void);
|
|
|
|
void Enter(void);
|
|
void Leave(void);
|
|
|
|
class ScopedLock
|
|
{
|
|
public:
|
|
explicit ScopedLock(CriticalSection* cs)
|
|
: m_cs(cs)
|
|
{
|
|
cs->Enter();
|
|
}
|
|
|
|
~ScopedLock(void)
|
|
{
|
|
m_cs->Leave();
|
|
}
|
|
|
|
private:
|
|
LC_DISABLE_COPY(ScopedLock);
|
|
LC_DISABLE_MOVE(ScopedLock);
|
|
LC_DISABLE_ASSIGNMENT(ScopedLock);
|
|
LC_DISABLE_MOVE_ASSIGNMENT(ScopedLock);
|
|
|
|
CriticalSection* m_cs;
|
|
};
|
|
|
|
private:
|
|
Windows::CRITICAL_SECTION m_cs;
|
|
};
|