AuroraRuntime/Source/Loop/WaitSingleBase.cpp

24 lines
547 B
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: WaitSingle.Generic.cpp
Date: 2021-10-2
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "WaitSingleBase.hpp"
namespace Aurora::Loop
{
bool WaitSingleBase::IsSignaled()
{
AuUInt one {};
this->OnPresleep();
auto handles = this->GetHandles();
auto val = WaitForAtleastOne(handles, one);
auto ret = this->OnTrigger(one, val);
this->OnFinishSleep();
return ret;
}
}