This documentation is archived and is not being maintained.

Barrier.SignalAndWait Method (CancellationToken)

Signals that a participant has reached the Barrier and waits for all other participants to reach the barrier, while observing a CancellationToken.

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

public void SignalAndWait(
	CancellationToken cancellationToken


Type: System.Threading.CancellationToken
The CancellationToken to observe.


cancellationToken has been canceled.


The current instance has already been disposed.


The method was invoked from within a post-phase action, the barrier currently has 0 participants, or the barrier is signaled by more threads than are registered as participants.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.