AddParticipants Method
Collapse the table of content
Expand the table of content

Barrier.AddParticipants Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Notifies the Barrier that there will be additional participants.

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

public long AddParticipants(
	int participantCount
)

Parameters

participantCount
Type: System.Int32
The number of additional participants to add to the barrier.

Return Value

Type: System.Int64
The phase number of the barrier in which the new participants will first participate.

ExceptionCondition
ObjectDisposedException

The current instance has already been disposed.

ArgumentOutOfRangeException

participantCount is less than 0.

-or-

Adding participantCount participants would cause the barrier's participant count to exceed 32,767.

InvalidOperationException

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

If the barrier is currently executing a post phase action, this call is blocked until the post phase action completes and the barrier has moved on to the next phase.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft