ApplicationQueuingAttribute.MaxListenerThreads Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Kuyruktan iletileri ayıklamak ve karşılık gelen bileşeni etkinleştirmek için kullanılan iş parçacığı sayısını alır veya ayarlar.
public:
property int MaxListenerThreads { int get(); void set(int value); };
public int MaxListenerThreads { get; set; }
member this.MaxListenerThreads : int with get, set
Public Property MaxListenerThreads As Integer
Özellik Değeri
Kuyruğa gelen iletileri işlemek için kullanılacak en fazla iş parçacığı sayısı. Varsayılan değer sıfırdır.
Örnekler
Aşağıdaki kod örneği, özniteliğin ApplicationQueuing
MaxListenerThreads özelliğinin değerini alır ve ayarlar.
// This example code requires that an ApplicationQueuing attribute be
// applied to the assembly, as shown below:
// [assembly: ApplicationQueuing]
// Get the ApplicationQueuingAttribute applied to the assembly.
ApplicationQueuingAttribute attribute =
(ApplicationQueuingAttribute)Attribute.GetCustomAttribute(
System.Reflection.Assembly.GetExecutingAssembly(),
typeof(ApplicationQueuingAttribute),
false);
// Display the current value of the attribute's MaxListenerThreads
// property.
Console.WriteLine(
"ApplicationQueuingAttribute.MaxListenerThreads: {0}",
attribute.MaxListenerThreads);
// Set the MaxListenerThreads property value of the attribute.
attribute.MaxListenerThreads = 1;
// Display the new value of the attribute's MaxListenerThreads
// property.
Console.WriteLine(
"ApplicationQueuingAttribute.MaxListenerThreads: {0}",
attribute.MaxListenerThreads);
' This example code requires that an ApplicationQueuing attribute be
' applied to the assembly, as shown below:
' [assembly: ApplicationQueuing]
' Get the ApplicationQueuingAttribute applied to the assembly.
Dim attribute As ApplicationQueuingAttribute = CType(attribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(), GetType(ApplicationQueuingAttribute), False), ApplicationQueuingAttribute)
' Display the current value of the attribute's MaxListenerThreads
' property.
MsgBox("ApplicationQueuingAttribute.MaxListenerThreads: " & attribute.MaxListenerThreads)
' Set the MaxListenerThreads property value of the attribute.
attribute.MaxListenerThreads = 1
' Display the new value of the attribute's MaxListenerThreads
' property.
MsgBox("ApplicationQueuingAttribute.MaxListenerThreads: " & attribute.MaxListenerThreads)
Açıklamalar
Bu özellik için geçerli aralık 0 ile 1000 arasındadır. Varsayılan değer sıfırdır. Yeni oluşturulan bir uygulama için, ayar şu anda varsayılan dinleyici iş parçacığı sayısını belirlemek için kullanılan algoritmadan türetilir: sunucudaki CPU sayısının 16 katı.
Daha fazla bilgi için bkz QcListenerMaxThreads
. Uygulamalar koleksiyonu.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin