Files
UnrealEngineUWP/Engine/Source/Developer/Windows/LiveCoding/Private/External/LC_Event.h
ben marsh b475bc61bd Merging Live++ 1.5.0
#rb none
#jira

#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 7321355 in //UE4/Release-4.23/... via CL 7321356
#ROBOMERGE-BOT: CORE (Main -> Dev-Core) (v371-7306989)

[CL 7370235 by ben marsh in Dev-Core branch]
2019-07-17 03:41:26 -04:00

44 lines
816 B
C++

// Copyright 2011-2019 Molecular Matters GmbH, all rights reserved.
#pragma once
#include "CoreTypes.h"
#include "Windows/MinimalWindowsApi.h"
// named/unnamed event.
// acts process-wide if given a name.
class Event
{
public:
struct Type
{
enum Enum
{
MANUAL_RESET,
AUTO_RESET
};
};
Event(const wchar_t* name, Type::Enum type);
~Event(void);
// Resets the event.
void Reset(void);
// Signals the event.
void Signal(void);
// Waits until the event becomes signaled, blocking.
bool Wait(void);
// Waits until the event becomes signaled, blocking until the timeout is reached.
// Returns whether the event was signaled.
bool WaitTimeout(unsigned int milliSeconds);
// Returns whether the event was signaled, non-blocking.
bool TryWait(void);
private:
Windows::HANDLE m_event;
};