[*] Ad-hoc system thread signals
This commit is contained in:
parent
937f123dad
commit
1ecd46ddbf
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user