.NET Framework Class Library |
Barrier Constructor (Int32, Action<(Of <(Barrier>)>)) |
Barrier Class See Also Send Feedback |
Initializes a new instance of the Barrier class.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ participantCount As Integer, _ postPhaseAction As Action(Of Barrier) _ ) |
C# |
---|
public Barrier( int participantCount, Action<Barrier> postPhaseAction ) |
Parameters
- participantCount
- Type: System..::.Int32
The number of participating threads.
- postPhaseAction
- Type: System..::.Action<(Of <(Barrier>)>)
The Action<(Of <(T>)>) to be executed after each phase.
Remarks
The postPhaseAction delegate will be executed after
all participants have arrived at the barrier in one phase. The participants
will not be released to the next phase until the postPhaseAction delegate
has completed execution.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentOutOfRangeException | participantCount is less than 0 or greater than MaxValue. |