Barrier Constructor (Int32, Action(Barrier))
Collapse the table of content
Expand the table of content

Barrier Constructor (Int32, Action<Barrier>)

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

Initializes a new instance of the Barrier class.

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

public Barrier(
	int participantCount,
	Action<Barrier> postPhaseAction
)

Parameters

participantCount
Type: System.Int32
The number of participating threads.
postPhaseAction
Type: System.Action<Barrier>
The Action<T> to be executed after each phase. null (Nothing in Visual Basic) may be passed to indicate no action is taken.

ExceptionCondition
ArgumentOutOfRangeException

participantCount is less than 0 or greater than 32,767.

The postPhaseAction delegate will be executed after all participants have arrived at the barrier in one phase. The participants will not be released to the next phase until the postPhaseAction delegate has completed execution.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft