[+] Enforce C++ assumptions

This commit is contained in:
Reece Wilson 2021-09-29 14:40:30 +01:00
parent 1a18847363
commit 5347fdbba1

View File

@ -367,7 +367,7 @@ namespace Aurora::Async
void AsyncApp::Start()
{
SysAssert(Spawn({0, 0}));
SysAssert(Spawn({0, 1}));
StartSched();
}
@ -471,6 +471,12 @@ namespace Aurora::Async
{
AU_LOCK_GUARD(rwlock_->AsWritable());
if (workerId.second == 0)
{
LogWarn("WorkerIds must not start from zero to preserve std::optiona nullability");
return false;
}
AuSPtr<GroupState> group;
// Try fetch or allocate group