ApplicationQueuingAttribute.MaxListenerThreads 속성

정의

큐에서 메시지를 추출하고 해당 구성 요소를 활성화하는 데 사용되는 스레드 수를 가져오거나 설정합니다.

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

속성 값

큐에 도착한 메시지를 처리하는 데 사용할 최대 스레드 수입니다. 기본값은 0입니다.

예제

다음 코드 예제를 가져오고 설정의 값을 ApplicationQueuing 특성의 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.
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)

설명

이 속성의 유효한 범위는 0에서 1000입니다. 기본값은 0입니다. 현재는 기본 수신기 스레드 수를 결정 하는 데 사용 된 알고리즘에서 파생 된 설정을 새로 만든 애플리케이션의 경우: 서버에 있는 Cpu 수가 16 배입니다.

자세한 내용은 Applications 컬렉션에서 를 참조 QcListenerMaxThreads 하세요.

적용 대상