Notifies the
Barrier that there will be additional participants.
Namespace:
System.Threading
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function AddParticipants ( _
participantCount As Integer _
) As Long |
C# |
---|
public long AddParticipants(
int participantCount
) |
Parameters
- participantCount
- Type: System..::.Int32
The number of additional participants to add to the
barrier.
Return Value
The phase number of the barrier in which the new participants will first
participate.
Exceptions
Exception | Condition |
---|
System..::.ArgumentOutOfRangeException | participantCount is less than
0. |
System..::.ArgumentOutOfRangeException | Adding participantCount participants would cause the
barrier's participant count to exceed MaxValue. |
System..::.InvalidOperationException |
The method was invoked from within a post-phase action.
|
System..::.ObjectDisposedException | The current instance has already been
disposed. |
See Also