mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Move portable things to AerofoilPortable.
This commit is contained in:
28
AerofoilPortable/GpThreadEvent_Cpp11.h
Normal file
28
AerofoilPortable/GpThreadEvent_Cpp11.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include "IGpThreadEvent.h"
|
||||
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
class GpThreadEvent_Cpp11 final : public IGpThreadEvent
|
||||
{
|
||||
public:
|
||||
~GpThreadEvent_Cpp11();
|
||||
|
||||
void Wait() override;
|
||||
bool WaitTimed(uint32_t msec) override;
|
||||
void Signal() override;
|
||||
void Destroy() override;
|
||||
|
||||
static GpThreadEvent_Cpp11 *Create(bool autoReset, bool startSignaled);
|
||||
|
||||
private:
|
||||
GpThreadEvent_Cpp11(bool autoReset, bool startSignaled);
|
||||
GpThreadEvent_Cpp11() = delete;
|
||||
|
||||
std::mutex m_mutex;
|
||||
std::condition_variable m_cvar;
|
||||
bool m_flag;
|
||||
bool m_autoReset;
|
||||
};
|
Reference in New Issue
Block a user