System.Threading.CountdownEvent Members

The members of System.Threading.CountdownEvent are listed below.

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of System.Threading.CountdownEvent class with the specified count.

Public Properties

[read-only]
CurrentCountint.

Gets the number of remaining signals required to set the event.

[read-only]
InitialCountint.

Gets the numbers of signals initially required to set the event.

[read-only]
IsSetbool.

Determines whether the event is set.

[read-only]
WaitHandleWaitHandle.

Gets a System.Threading.WaitHandle that is used to wait for the event to be set.

Public Methods

AddCount()

Increments the System.Threading.CountdownEvent's current count by one.

AddCount(int)

Increments the System.Threading.CountdownEvent's current count by a specified value.

Dispose()

Releases all resources used by the current instance of the System.Threading.CountdownEvent class.

Reset()

Resets the CountdownEvent.CurrentCount to the value of CountdownEvent.InitialCount.

Reset(int)

Resets the CountdownEvent.InitialCount property to a specified value.

Signal() : bool

Registers a signal with the System.Threading.CountdownEvent, decrementing the value of CountdownEvent.CurrentCount.

Signal(int) : bool

Registers multiple signals with the System.Threading.CountdownEvent, decrementing the value of CountdownEvent.CurrentCount by the specified amount.

TryAddCount() : bool

Attempts to increment CountdownEvent.CurrentCount by one.

TryAddCount(int) : bool

Attempts to increment CountdownEvent.CurrentCount by a specified value.

Wait()

Blocks the current thread until the System.Threading.CountdownEvent is set.

Wait(int) : bool

Blocks the current thread until the System.Threading.CountdownEvent is set, using a 32-bit signed integer to measure the timeout.

Wait(CancellationToken)

Blocks the current thread until the System.Threading.CountdownEvent is set, while observing a System.Threading.CancellationToken.

Wait(TimeSpan) : bool

Blocks the current thread until the System.Threading.CountdownEvent is set, using a TimeSpan to measure the timeout.

Wait(int, CancellationToken) : bool

Blocks the current thread until the System.Threading.CountdownEvent is set, using a 32-bit signed integer to measure the timeout, while observing a System.Threading.CancellationToken.

Wait(TimeSpan, CancellationToken) : bool

Blocks the current thread until the System.Threading.CountdownEvent is set, using a TimeSpan to measure the timeout, while observing a System.Threading.CancellationToken.

Protected Methods

Dispose(bool)

Releases the unmanaged resources used by the System.Threading.CountdownEvent, and optionally releases the managed resources.