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

屬性值

Int32

在用於這個組態範圍中的要求之前,Common Language Runtime (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 會為需要更多執行緒才能完成處理的要求,保留這個數目的可用執行緒。

適用於

另請參閱