Skip to content

Commit 118f893

Browse files
author
MPCoreDeveloper
committed
fix: ensure cancellation token is properly observed after Parallel.ForEachAsync
1 parent fa2da21 commit 118f893

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/SharpCoreDB.Graph/ParallelGraphTraversalEngine.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ await Parallel.ForEachAsync(
129129
}
130130
});
131131

132+
// ✅ Check cancellation after parallel work completes
133+
cancellationToken.ThrowIfCancellationRequested();
134+
132135
currentLevel = nextLevel;
133136
}
134137

0 commit comments

Comments
 (0)