[*] Ad-hoc system thread signals

This commit is contained in:
Reece Wilson 2023-08-24 10:40:15 +01:00
parent 937f123dad
commit 1ecd46ddbf

View File

@ -258,6 +258,10 @@ namespace Aurora::Threading::Threads
AuSPtr<IWaitable> OSThread::AsWaitable()
{
if (!this->terminated_)
{
this->terminated_ = AuThreadPrimitives::EventShared(true, false, true);
}
return this->terminated_;
}
@ -1420,7 +1424,11 @@ namespace Aurora::Threading::Threads
AuSPtr<AuLoop::ILoopSource> OSThread::AsLoopSource()
{
return this->terminateSignalLs_;
if (!this->terminatedSignalLs_)
{
this->terminatedSignalLs_ = AuLoop::NewLSEvent(true, false, true);
}
return this->terminatedSignalLs_;
}
AuSPtr<IWaitable> OSThread::GetShutdownSignalWaitable()