AuroraRuntime/Source/Threading/Primitives/AuConditionMutex.NT.hpp
Reece Wilson 51a2816f3f [*] Merge GTK JS's branch fix for async shutdown
[+] IConditionMutex::TryLock()
... Timed is still too much of an ask for this interface, i think. There's a good reason as to why this isn't a iwaitable. This condvar interface must be as common and primitive as possible.
2023-01-30 13:26:17 +00:00

31 lines
653 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuConditionMutex.Win32.hpp
Date: 2021-6-12
Author: Reece
***/
#pragma once
#include "AuIConditionMutexEx.hpp"
#if !defined(_AURUNTIME_GENERICCM)
namespace Aurora::Threading::Primitives
{
struct Win32ConditionMutex : IConditionMutexEx
{
Win32ConditionMutex();
~Win32ConditionMutex();
bool TryLock() override;
void Lock() override;
void Unlock() override;
AuUInt GetOSHandle() override;
private:
SRWLOCK lock_;
};
using ConditionMutexImpl = Win32ConditionMutex;
}
#endif