ProcessModelSection.MinWorkerThreads 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 CLR 线程池中每个 CPU 的最少辅助线程数。
public:
property int MinWorkerThreads { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("minWorkerThreads", DefaultValue=1)]
[System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)]
public int MinWorkerThreads { get; set; }
[<System.Configuration.ConfigurationProperty("minWorkerThreads", DefaultValue=1)>]
[<System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)>]
member this.MinWorkerThreads : int with get, set
Public Property MinWorkerThreads As Integer
属性值
CLR 线程池中每个 CPU 的最小工作线程数。
- 属性
示例
下面的代码示例演示如何访问 MinWorkerThreads 属性。
// Get the current MinWorkerThreads property value.
int minWorkerThreads =
processModelSection.MinWorkerThreads;
// Set the MinWorkerThreads property to 2.
processModelSection.MinWorkerThreads = 2;
' Get the current MinWorkerThreads property value.
Dim minWorkerThreads As Integer = _
processModelSection.MinWorkerThreads
' Set the MinWorkerThreads property to 2.
processModelSection.MinWorkerThreads = 2