Skip to content

Commit 89c2eca

Browse files
authored
Merge pull request #776 from microsoft/dev/lifengl/fixTypo
Fix a typo in the JTF dependency computation code.
2 parents 66ae839 + e5bfd8f commit 89c2eca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Microsoft.VisualStudio.Threading/JoinableTaskDependencyGraph.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ private static void ComputeSelfAndDescendentOrJoinedJobsAndRemainTasks(IJoinable
760760
{
761761
if (reachableNodes.Add(taskOrCollection))
762762
{
763-
if (remainNodes.Remove(taskOrCollection) && reachableNodes.Count == 0)
763+
if (remainNodes.Remove(taskOrCollection) && remainNodes.Count == 0)
764764
{
765765
// no remain task left, quit the loop earlier
766766
return;
@@ -772,6 +772,10 @@ private static void ComputeSelfAndDescendentOrJoinedJobsAndRemainTasks(IJoinable
772772
foreach (KeyValuePair<IJoinableTaskDependent, int> item in dependencies)
773773
{
774774
ComputeSelfAndDescendentOrJoinedJobsAndRemainTasks(item.Key, reachableNodes, remainNodes);
775+
if (remainNodes.Count == 0)
776+
{
777+
return;
778+
}
775779
}
776780
}
777781
}

0 commit comments

Comments
 (0)