[*] Fix a deadlock in auasync

This commit is contained in:
Reece Wilson 2022-05-19 04:07:10 +01:00
parent 997c7cb325
commit 4079d471a7

View File

@ -501,11 +501,14 @@ namespace Aurora::Async
}
// Dispatch
itr->second->RunAsync();
auto oops = itr->second;
// Remove from our local job queue
itr = state->pendingWorkItems.erase(itr);
// Dispatch
oops->RunAsync();
// Atomically decrement global task counter
runningTasks = this->tasksRunning_.fetch_sub(1) - 1;
}