AuroraRuntime/Source/IO/AuIOWaitableIOCompletionGroup.hpp
2024-01-06 04:32:54 +00:00

39 lines
1.2 KiB
C++

/***
Copyright (C) 2024 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuIOWaitableIOCompletionGroup.hpp
Date: 2024-1-6
Author: Reece
***/
#pragma once
namespace Aurora::IO
{
struct IOWaitableIOCompletionGroup : IIOWaitableItem
{
IOWaitableIOCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pGroup, bool bAny = true);
IOWaitableIOCompletionGroup();
void SetGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pGroup);
void Bind(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pGroup,
const AuSPtr<IIOProcessorManualInvoker> &pParent);
bool IsRunOnOtherTick() override;
bool IsRunOnTick() override;
bool CanRequestTick() override;
void OnReportPumper(const AuSPtr<IIOProcessorManualInvoker> &iface) override;
bool IsRunOnSelfIO() override;
AuSPtr<Loop::ILoopSource> GetSelfIOSource() override;
bool ApplyRateLimit() override;
AuUInt32 IOTimeoutInMS() override;
bool IsRunOnSelfIOCheckedOnTimerTick() override;
AuSPtr<IO::CompletionGroup::ICompletionGroup> pGroup;
AuSPtr<IIOProcessorManualInvoker> pParent {};
bool bAny { true };
};
}