# Run-time configuration options for threading

## CPU groups

• Configures whether threads are automatically distributed across CPU groups.
• If you omit this setting, threads are not distributed across CPU groups. This is equivalent to setting the value to 0.
Setting name Values
runtimeconfig.json N/A N/A
Environment variable COMPlus_Thread_UseAllCpuGroups 0 - disabled
1 - enabled

• Specifies the minimum number of threads for the worker thread pool.
Setting name Values
runtimeconfig.json System.Threading.ThreadPool.MinThreads An integer that represents the minimum number of threads
MSBuild property ThreadPoolMinThreads An integer that represents the minimum number of threads
Environment variable N/A N/A

### Examples

runtimeconfig.json file:

{
"runtimeOptions": {
"configProperties": {
}
}
}


Project file:

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
</PropertyGroup>

</Project>


• Specifies the maximum number of threads for the worker thread pool.
Setting name Values
runtimeconfig.json System.Threading.ThreadPool.MaxThreads An integer that represents the maximum number of threads
MSBuild property ThreadPoolMaxThreads An integer that represents the maximum number of threads
Environment variable N/A N/A

### Examples

runtimeconfig.json file:

{
"runtimeOptions": {
"configProperties": {
}
}
}


Project file:

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>