Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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
)

Parameters

participantCount
Type: System::Int32

The number of additional participants to remove from the barrier.

Exception Condition
ObjectDisposedException

The current instance has already been disposed.

ArgumentOutOfRangeException

participantCount is less than 0.

InvalidOperationException

The barrier already has 0 participants.

-or-

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

-or-

current participant count is less than the specified participantCount

ArgumentOutOfRangeException

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
Show:
© 2017 Microsoft