[+] IAsyncOutputOf::TryAttachProcessExitToCompletionGroup

[+] IAsyncOutputOf::ICompletionGroupWorkHandle
This commit is contained in:
Reece Wilson 2024-01-06 01:32:03 +00:00
parent 2ebf2811bd
commit 3c7eff396f
2 changed files with 26 additions and 0 deletions

View File

@ -33,6 +33,8 @@ namespace Aurora::Processes
virtual bool BlockUntilFinishedMS(AuUInt32 uRelMS) = 0;
virtual bool HasFinished() = 0;
virtual IProcess *GetProcess() = 0;
virtual bool TryAttachProcessExitToCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pCompletionGroup) = 0;
virtual IO::CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() = 0;
};
AUKN_SYM OutputOfResult OutputOf(StartupParameters &&parameters,

View File

@ -238,6 +238,30 @@ namespace Aurora::Processes
return &this->result;
}
bool TryAttachProcessExitToCompletionGroup(const AuSPtr<IO::CompletionGroup::ICompletionGroup> &pCompletionGroup) override
{
if (this->process)
{
return this->process->TryAttachProcessExitToCompletionGroup(pCompletionGroup);
}
else
{
return {};
}
}
IO::CompletionGroup::ICompletionGroupWorkHandle *ToCompletionGroupHandle() override
{
if (this->process)
{
return this->process->ToCompletionGroupHandle();
}
else
{
return {};
}
}
bool BlockUntilFinishedMS(AuUInt32 uRelMS) override
{
if (this->bHasFinished)