Skip to content

Commit

Permalink
Use ConfigureAwait(true) (#74982)
Browse files Browse the repository at this point in the history
#74825 (review)

I don't think we need to run on the same thread.
  • Loading branch information
MichalStrehovsky committed Sep 5, 2022
1 parent b8131c7 commit 4940059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coreclr/tools/Common/Sorting/MergeSortCore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ private static async Task ParallelSort(TDataStructure arrayToSort, int index, in

T[] localCopyOfHalfOfArray = new T[halfLen];
accessor.Copy(arrayToSort, index, localCopyOfHalfOfArray, 0, halfLen);
await MergeSortCore<T, T[], ArrayAccessor<T>, TComparer, TCompareAsEqualAction>.ParallelSort(localCopyOfHalfOfArray, 0, halfLen, comparer).ConfigureAwait(true);
await rightSortTask.ConfigureAwait(true);
await MergeSortCore<T, T[], ArrayAccessor<T>, TComparer, TCompareAsEqualAction>.ParallelSort(localCopyOfHalfOfArray, 0, halfLen, comparer).ConfigureAwait(false);
await rightSortTask.ConfigureAwait(false);
Merge(localCopyOfHalfOfArray, arrayToSort, index, halfLen, length, comparer);
}
}
Expand Down

1 comment on commit 4940059

@rhuijben
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice commit message, for switching to ConfigurAwait(false) ;-)

Please sign in to comment.