Fixed Windows/MSVC compilation.

This commit is contained in:
2024-06-26 10:05:32 +02:00
parent b10f250945
commit b1fa99428e
8 changed files with 41 additions and 5 deletions

View File

@@ -40,10 +40,10 @@ void MultiThreadedTaskLoop::managerThread(std::stop_token stopToken) // NOLINT(p
while (!stopToken.stop_requested())
{
// first clear out any parked tasks that are actually finished
auto it = std::remove_if(parkedTasks_.begin(), parkedTasks_.end(), [](StoredTask& task) {
auto itRem = std::remove_if(parkedTasks_.begin(), parkedTasks_.end(), [](StoredTask& task) {
return !task.task || task.task->status() == TaskStatus::FINISHED;
});
parkedTasks_.erase(it, parkedTasks_.end());
parkedTasks_.erase(itRem, parkedTasks_.end());
// then try to push any task from the buffer into the queue, if possible
for (auto it = parkedTasks_.begin(); it != parkedTasks_.end();)