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

#ROBOMERGE-SOURCE: CL 7321355 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v371-7306989)

[CL 7321356 by ben marsh in Main branch]
2019-07-16 08:43:32 -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;
};