Core/TaskScheduler: Another try to remove race condition

This commit is contained in:
SirLynix
2024-02-04 13:04:29 +01:00
parent c148bc2851
commit 44617bd14d
3 changed files with 15 additions and 10 deletions

View File

@@ -39,7 +39,7 @@ SCENARIO("TaskScheduler", "[CORE][TaskScheduler]")
Nz::Time elapsedTime = clock.GetElapsedTime();
CHECK(count == scheduler.GetWorkerCount());
CHECK(elapsedTime < Nz::Time::Milliseconds(scheduler.GetWorkerCount() * 100));
CHECK(elapsedTime < Nz::Time::Milliseconds(std::max(scheduler.GetWorkerCount(), 2u) * 100));
}
WHEN("We add a lot of tasks and wait for all of them")