Files
dotnet-runtime/src/libraries/System.Threading.Tasks.Parallel/tests
Koundinya Veluri 58db84ddb3 Fix Parallel.For* to consistently throw exception upon cancellation (dotnet/corefx#20259)
Fix Parallel.For* to consistently throw exception upon cancellation

Fix for dotnet/corefx#20093 in master:
- Write the exception to be thrown upon cancellation before setting the canceled state so that the exception will be visible upon cancellation
- Dispose the cancellation token registration before checking the exception so that a late cancellation would never yield an incomplete return status with no exception

Commit migrated from https://github.com/dotnet/corefx/commit/62bfba654acf00e4b0fc0811be057c637b135bba
2017-05-24 12:57:25 -07:00
..