Barrier.RemoveParticipants Method (Int32)

.NET Framework (current version)

Notifies the Barrier that there will be fewer participants.

Namespace:   System.Threading
Assembly:  System (in System.dll)

public void RemoveParticipants(
	int participantCount


Type: System.Int32

The number of additional participants to remove from the barrier.

Exception Condition

The current instance has already been disposed.


participantCount is less than 0.


The barrier already has 0 participants.


The method was invoked from within a post-phase action.


current participant count is less than the specified participantCount


The total participant count is less than the specified participantCount

If participantCount participants are already waiting on the barrier, this removal fulfills the barrier, the post phase action is executed and all of the participants are woken as if this participant being removed had successfully reached the barrier.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top