[+] ICompletionGroup::WaitForAnyMS
[+] ICompletionGroup::WaitForAnyNS
This commit is contained in:
parent
f1e170add0
commit
6d77a55d75
@ -35,6 +35,10 @@ namespace Aurora::IO::CompletionGroup
|
|||||||
|
|
||||||
virtual AuSPtr<Loop::ILSEvent> GetTriggerLoopSource() = 0;
|
virtual AuSPtr<Loop::ILSEvent> GetTriggerLoopSource() = 0;
|
||||||
virtual void TryTrigger() = 0;
|
virtual void TryTrigger() = 0;
|
||||||
|
|
||||||
|
// 0 = indefinite
|
||||||
|
virtual bool WaitForAnyMS(AuUInt32 uTimeoutOrZeroMS = 0) = 0;
|
||||||
|
virtual bool WaitForAllMS(AuUInt32 uTimeoutOrZeroMS = 0) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
AUKN_SYM AuSPtr<ICompletionGroup> NewCompletionGroup();
|
AUKN_SYM AuSPtr<ICompletionGroup> NewCompletionGroup();
|
||||||
|
@ -151,6 +151,30 @@ namespace Aurora::IO::CompletionGroup
|
|||||||
return this->anyProbablyAlwaysPresentEvent.GetLoopSource();
|
return this->anyProbablyAlwaysPresentEvent.GetLoopSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CompletionGroup::WaitForAnyMS(AuUInt32 uTimeoutOrZeroMS)
|
||||||
|
{
|
||||||
|
if (auto pLoopSource = this->ToAnyLoopSource())
|
||||||
|
{
|
||||||
|
return pLoopSource->WaitOn(uTimeoutOrZeroMS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CompletionGroup::WaitForAllMS(AuUInt32 uTimeoutOrZeroMS)
|
||||||
|
{
|
||||||
|
if (auto pLoopSource = this->ToAndLoopSource())
|
||||||
|
{
|
||||||
|
return pLoopSource->WaitOn(uTimeoutOrZeroMS);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CompletionGroup::TryTrigger()
|
void CompletionGroup::TryTrigger()
|
||||||
{
|
{
|
||||||
if (auto pSource = GetTriggerLoopSource())
|
if (auto pSource = GetTriggerLoopSource())
|
||||||
|
@ -24,6 +24,9 @@ namespace Aurora::IO::CompletionGroup
|
|||||||
AuSPtr<Async::IWorkItem> OnCompletion() override;
|
AuSPtr<Async::IWorkItem> OnCompletion() override;
|
||||||
AuSPtr<Async::IWorkItem> OnSingleCompletion() override;
|
AuSPtr<Async::IWorkItem> OnSingleCompletion() override;
|
||||||
|
|
||||||
|
bool WaitForAnyMS(AuUInt32 uTimeoutOrZeroMS) override;
|
||||||
|
bool WaitForAllMS(AuUInt32 uTimeoutOrZeroMS) override;
|
||||||
|
|
||||||
AuSPtr<Loop::ILSEvent> GetTriggerLoopSource() override;
|
AuSPtr<Loop::ILSEvent> GetTriggerLoopSource() override;
|
||||||
void TryTrigger() override;
|
void TryTrigger() override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user