[+] 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();
}
@ -470,6 +470,12 @@ namespace Aurora::Async
bool AsyncApp::Spawn(WorkerId_t workerId)
{
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;