[release/9.0-staging] Transfer ThreadPool local queue to high-pri queue on Task blocking by github-actions[bot] · Pull Request #109989 · dotnet/runtime

Backport of #109841 to release/9.0-staging

/cc @stephentoub

Customer Impact

  • Customer reported
  • Found internally

This is an experimental fix related #103984. Some 1p services that use a lot of sync-over-async are experiencing stalls due to some priority inversion issues in work items that get queued to the thread pool. In some situations, the services stall for a long time until a large number of worker threads are injected, which can take a long time. This change would help the app continue to make progress. This change (in addition addition to some app-level throttling to stop new items from being added to the request queue) should help with unblocking.

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

n/a. This is experimental to validate in production with the config set.

Risk

Low, the feature is behind a config flag