fixed the issue that job can't schedule correctly when have a invalid dependency.

This commit is contained in:
2026-05-03 16:25:47 +09:00
parent fe8362e029
commit 9e9339de3c
2 changed files with 1 additions and 6 deletions

View File

@@ -334,15 +334,10 @@ public sealed unsafe partial class JobScheduler : IDisposable
for (var i = 0; i < dependencies.Length; i++)
{
var dependency = dependencies[i];
if (!dependency.IsValid)
{
continue;
}
ref var depJobInfo = ref _jobInfoPool.GetElementReferenceAt(dependency.ID, dependency.Generation, out var exist);
if (!exist)
{
// Dependency does not exist (likely completed already)
Interlocked.Decrement(ref infoInPool.dependencyCount);
continue;
}