Closed
Description
Is it necessary to call po.CancellationToken.ThrowIfCancellationRequested()
if it throws (and then catches) the same OperationCanceledException
anyway?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 2ad8b3ee-d780-0844-bc19-1f725df6fcc1
- Version Independent ID: c83570d1-5b88-06fa-b3ed-6ff984f7c310
- Content: How to: Cancel a Parallel.For or ForEach Loop
- Content Source: docs/standard/parallel-programming/how-to-cancel-a-parallel-for-or-foreach-loop.md
- Product: dotnet-fundamentals
- GitHub Login: @IEvangelist
- Microsoft Alias: dapine