[*] Fix: ThreadPool::ResolveHandle throws null

This commit is contained in:
Reece Wilson 2023-02-06 04:07:54 +00:00
parent 013c1a00bd
commit 8b6c93fba9

View File

@ -738,7 +738,13 @@ namespace Aurora::Async
AuThreads::ThreadShared_t ThreadPool::ResolveHandle(WorkerId_t id)
{
return GetThreadHandle(id)->threadObject;
auto pState = GetThreadHandle(id);
if (!pState)
{
return {};
}
return pState->threadObject;
}
AuBST<ThreadGroup_t, AuList<ThreadId_t>> ThreadPool::GetThreads()