27 lines
675 B
C++
27 lines
675 B
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ConditionVariable.Win32.hpp
|
|
Date: 2021-6-12
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#if !defined(_AURUNTIME_GENERICCV)
|
|
namespace Aurora::Threading::Primitives
|
|
{
|
|
struct ConditionVariableImpl : IConditionVariable
|
|
{
|
|
ConditionVariableImpl(const AuSPtr<IConditionMutex> &mutex);
|
|
|
|
AuSPtr<IConditionMutex> GetMutex() override;
|
|
bool WaitForSignal(AuUInt32 timeout) override;
|
|
void Signal() override;
|
|
void Broadcast() override;
|
|
|
|
private:
|
|
CONDITION_VARIABLE winCond_;
|
|
AuSPtr<IConditionMutexEx> mutex_;
|
|
};
|
|
}
|
|
#endif |