Barrier 생성자

정의

Barrier 클래스의 새 인스턴스를 초기화합니다.

오버로드

Barrier(Int32)

Barrier 클래스의 새 인스턴스를 초기화합니다.

Barrier(Int32, Action<Barrier>)

Barrier 클래스의 새 인스턴스를 초기화합니다.

Barrier(Int32)

Barrier 클래스의 새 인스턴스를 초기화합니다.

public:
 Barrier(int participantCount);
public Barrier (int participantCount);
new System.Threading.Barrier : int -> System.Threading.Barrier
Public Sub New (participantCount As Integer)

매개 변수

participantCount
Int32

참여 스레드의 수입니다.

예외

participantCount가 0보다 작거나 32,767보다 큽니다.

추가 정보

적용 대상

Barrier(Int32, Action<Barrier>)

Barrier 클래스의 새 인스턴스를 초기화합니다.

public:
 Barrier(int participantCount, Action<System::Threading::Barrier ^> ^ postPhaseAction);
public Barrier (int participantCount, Action<System.Threading.Barrier> postPhaseAction);
public Barrier (int participantCount, Action<System.Threading.Barrier>? postPhaseAction);
new System.Threading.Barrier : int * Action<System.Threading.Barrier> -> System.Threading.Barrier
Public Sub New (participantCount As Integer, postPhaseAction As Action(Of Barrier))

매개 변수

participantCount
Int32

참여 스레드의 수입니다.

postPhaseAction
Action<Barrier>

각 단계 후에 실행할 Action<T>입니다. 아무 작업도 수행되지 않았음을 나타내기 위해 null(Visual Basic의 경우 Nothing)이 전달될 수 있습니다.

예외

participantCount가 0보다 작거나 32,767보다 큽니다.

설명

postPhaseAction 모든 참가자가 한 단계의 장벽에 도달하면 대리자가 실행됩니다. 참가자는 postPhaseAction 대리자가 실행을 완료할 때까지 다음 단계로 릴리스되지 않습니다.

추가 정보

적용 대상