[+] Enforce C++ assumptions
This commit is contained in:
parent
1a18847363
commit
5347fdbba1
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user