共用方式為


HttpRuntimeSection.MinFreeThreads 屬性

定義

取得或設定必須保持的最低空閒執行緒數,才能處理此組態範圍內的資源請求。

public:
 property int MinFreeThreads { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("minFreeThreads", DefaultValue=8)]
[System.Configuration.IntegerValidator(MinValue=0)]
public int MinFreeThreads { get; set; }
[<System.Configuration.ConfigurationProperty("minFreeThreads", DefaultValue=8)>]
[<System.Configuration.IntegerValidator(MinValue=0)>]
member this.MinFreeThreads : int with get, set
Public Property MinFreeThreads As Integer

屬性值

在此配置範圍內,請求前的通用語言執行時(CLR)執行緒池中,將被服務的最低空閒執行緒數。 預設值為 8

屬性

範例

以下範例說明如何使用該 MinFreeThreads 屬性。

// Get the MinFreeThreads property value.
Response.Write("MinFreeThreads: " +
  configSection.MinFreeThreads + "<br>");

// Set the MinFreeThreads property value to 16
configSection.MinFreeThreads = 16;
' Get the MinFreeThreads property value.
Response.Write("MinFreeThreads: " & _
  configSection.MinFreeThreads & "<br>")

' Set the MinFreeThreads property value to 16
configSection.MinFreeThreads = 16

備註

MinFreeThreads 屬性定義執行請求所需的最少可用執行緒數。 若執行緒數量不足,請求將持續排隊,並持續定期檢查執行緒可用性,直到達到所需執行緒數量。 預設值為 8

備註

ASP.NET 會讓這些執行緒數量留給需要額外執行緒完成處理的請求。

適用於

另請參閱