Skip to content

Exception already being thrown #836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ygoe opened this issue Aug 16, 2018 — with docs.microsoft.com · 1 comment
Open

Exception already being thrown #836

ygoe opened this issue Aug 16, 2018 — with docs.microsoft.com · 1 comment
Labels
area-System.Threading.Tasks dotnet-api/prod Pri2 Indicates issues/PRs that are medium priority
Milestone

Comments

Copy link

ygoe commented Aug 16, 2018

So the Parallel class looks at the CancellationToken [from time to time, that's not specified] to prematurely end the loop. But what happens if the OperationCanceledException was already thrown from within the code executed in parallel, using the same CancellationToken? Will it be caught and handled properly? Or will it be passed on in some form of AggregateException just like any other exception being thrown in Parallel loops? Multiple concurrently running "tasks" might throw that exception at the same time before the loop can end. Some clarification on how I may use the CancellationToken would be helpful.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@rpetrusha rpetrusha self-assigned this Aug 20, 2018
@rpetrusha
Copy link

Thanks, @ygoe, for your comment. We've added this issue to our backlog.

@BillWagner BillWagner transferred this issue from dotnet/docs Nov 20, 2018
@dotnet-bot dotnet-bot added untriaged New issue has not been triaged by the area owner Source - Docs.ms and removed rerun-labels labels Nov 20, 2018
@rpetrusha rpetrusha added this to the Backlog milestone Nov 20, 2018
@rpetrusha rpetrusha removed the untriaged New issue has not been triaged by the area owner label Nov 20, 2018
@rpetrusha rpetrusha removed their assignment Oct 7, 2019
@PRMerger10 PRMerger10 added the Pri2 Indicates issues/PRs that are medium priority label Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Threading.Tasks dotnet-api/prod Pri2 Indicates issues/PRs that are medium priority
Projects
None yet
Development

No branches or pull requests

6 participants