AuroraRuntime/Include/Aurora/Threading/Primitives/ConditionEx.hpp
Reece Wilson 124038df62 [*] Refactor public headers
[+] AuConsole::Commands::RemoveCommand
[+] EExtendedUsage::eServerAuth
[+] SysPanic2 for SysSafeLine hints (backtrace may contain optimized SysPanics, making tracing the true origin difficult)
[*] Reworked SysAssertions
[*] AuParse::EncodeHex now takes AuMemoryViewRead
[*] AuRng::ReadSecureRNG now takes AuMemoryViewWrite
[*] AuRng::ReadFastRNG now takes AuMemoryViewWrite
2023-01-15 06:05:22 +00:00

30 lines
1.2 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: ConditionEx.hpp
Date: 2021-6-11
Author: Reece
***/
#pragma once
namespace Aurora::Threading::Primitives
{
/**
A comprehensive CV that does not strictly abide by typical assumptions. <br>
This object is not optimal; however, it will work with any or no IWaitable <br>
On systems where context switches are expensive, this object should be avoided at all costs <br>
This object depends on the synchronization of primitives within our abstraction layer rather than the OS's implementation of condition variables. <br>
Note: missing pWaitables cannnot serve as an `atomic wait for while is [not] value` operation as found under modern operating system schedulers.
There are no legal use cases for this feature. It's just there.
*/
struct ConditionEx
{
virtual void WaitForSignal() = 0;
virtual void WaitForSignal(Threading::IWaitable *waitable) = 0;
virtual void WaitForSignal(const AuSPtr<Threading::IWaitable> &waitable) = 0;
virtual void Broadcast() = 0;
virtual void Signal() = 0;
};
AUKN_SHARED_API(FeaturefulCondition, ConditionEx);
}