Fix thread pool hang (#56346)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Tue, 27 Jul 2021 16:59:14 +0000 (09:59 -0700)
committerGitHub <noreply@github.com>
Tue, 27 Jul 2021 16:59:14 +0000 (09:59 -0700)
commiteaaf43fba6e10239970807e943a64b9638e02206
tree94603043401443c5913cdefff374ea44e8aae0d5
parentbf5fe8c411e0d0a0eaef1f125f84d3fd0ca70bee
Fix thread pool hang (#56346)

* Fix thread pool hang

- In https://github.com/dotnet/runtime/pull/53471 the thread count goal was moved out of `ThreadCounts`, it turns out that are a few subtle races that it was avoiding. There are other ways to fix it, but I've added the goal back into `ThreadCounts` for now.
- Reverted PR https://github.com/dotnet/runtime/pull/55985, which worked around the issue in the CI

Fixes https://github.com/dotnet/runtime/issues/55642

* Revert "mitigation for quic tests hangs (#55985)"

This reverts commit 0a5e93b09fe92cf866456552eef78a95bf6fdf27.
src/libraries/System.Net.Quic/src/System/Net/Quic/Implementations/MsQuic/MsQuicStream.cs
src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.Blocking.cs
src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.GateThread.cs
src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.ThreadCounts.cs
src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.WorkerThread.cs
src/libraries/System.Private.CoreLib/src/System/Threading/PortableThreadPool.cs
src/libraries/System.Threading.ThreadPool/tests/ThreadPoolTests.cs