dotnet / dotnet/runtime

Environment variable support for thread pool min threads config

Open
#132,828 7 comments 0 reactions 0 assignees View on GitHub
area-System.Threading documentation
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

`DOTNET_ThreadPool_MinThreads` is not supported as an environment variable from current .NET docs https://learn.microsoft.com/en-us/dotnet/core/runtime-config/threading#minimum-threads

For minimum worker threads, docs show:
```
runtimeconfig.json: System.Threading.ThreadPool.MinThreads
MSBuild property: ThreadPoolMinThreads
Environment variable: N/A
```

Image

Sometimes we want to configure the ThreadPool min threads to avoid thread starvation issue, we will have to update the code base due to lack of environment variable support, hope we could have environment variable support to configure the thread pool min threads.

Contributor guide

Open the contributing guide

Research direction

Start with the .NET runtime threading configuration documentation and the existing entries for System.Threading.ThreadPool.MinThreads and ThreadPoolMinThreads. Trace how runtime configuration values become environment-variable settings, then verify that DOTNET_ThreadPool_MinThreads is accepted and that the documentation no longer lists environment-variable support as N/A.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.