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