0ef9ec292b577c5ecd299aed99e085cb1dce09de
Between discussion at #1137 and a few rounds of revision at #1159 we arrived at an optimisation where tasks that are both heavily hit and very likely to return in a completed state are checked for a status of either RanToCompletion, Canceled or Faulted and a path is taken where no await is needed for any of those. The Canceled and Faulted tasks are returned immediately, allowing that state to be passed to the caller. However, these are exceptional cases, and if we just continued the subsequent await would raise the appropriate exception. Checking for all three cases instead of just RanToCompletion is optimising for those execptional conditions at cost (in the form of a larger comparison segment of code) to the more common cases of the task either being completed or still running. Simplify this back to a check just for RanToCompletion.
Description
Json.NET 是一种适用于 .NET 的常用高性能 JSON 框架
https://github.com/JamesNK/Newtonsoft.Json.git
27 MiB
Languages
C#
99.3%
PowerShell
0.7%