Skip to content

Commit

Permalink
Fix issue with cancelling AsyncBatchingWorkQueue
Browse files Browse the repository at this point in the history
This was simply a mistake on my part. We should not assume that code is unreachable when it is reached because an OperationCanceledException is caught.
  • Loading branch information
DustinCampbell committed Jul 17, 2024
1 parent ea83da4 commit b8f14d3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ void AddItemsToBatch(IEnumerable<TItem> items)
catch (OperationCanceledException)
{
// Silently continue to allow the next batch to be processed.
return default;
}

return Assumed.Unreachable<TResult?>();
}

private (ImmutableArray<TItem> items, CancellationToken batchCancellationToken) GetNextBatchAndResetQueue()
Expand Down

0 comments on commit b8f14d3

Please sign in to comment.