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
Exceptions
| Exception | Condition |
|---|
| System..::.ArgumentOutOfRangeException | participantCount is less than 0
or greater than MaxValue. |
See Also