System.Threading.ManualResetEventSlim Members

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

See Also: Inherited members from System.Object

Public Constructors

Initializes a new instance of the System.Threading.ManualResetEventSlim class with an initial state of nonsignaled.

Initializes a new instance of the System.Threading.ManualResetEventSlim class with a Boolean value indicating whether to set the intial state to signaled.

Initializes a new instance of the System.Threading.ManualResetEventSlim class with a Boolean value indicating whether to set the intial state to signaled and a specified spin count.

Public Properties

[read-only]
IsSetbool.

Gets whether the event is set.

[read-only]
SpinCountint.

Gets the number of spin waits that will be occur before falling back to a kernel-based wait operation.

[read-only]
WaitHandleWaitHandle.

Gets the underlying System.Threading.WaitHandle object for this System.Threading.ManualResetEventSlim.

Public Methods

Dispose()

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

Reset()

Sets the state of the event to nonsignaled, which causes threads to block.

Set()

Sets the state of the event to signaled, which allows one or more threads waiting on the event to proceed.

Wait()

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

Wait(int) : bool

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

Wait(CancellationToken)

Blocks the current thread until the current System.Threading.ManualResetEventSlim receives a signal, while observing a System.Threading.CancellationToken.

Wait(TimeSpan) : bool

Blocks the current thread until the current System.Threading.ManualResetEventSlim is set, using a TimeSpan to measure the time interval.

Wait(int, CancellationToken) : bool

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

Wait(TimeSpan, CancellationToken) : bool

Blocks the current thread until the current System.Threading.ManualResetEventSlim is set, using a TimeSpan to measure the time interval, while observing a System.Threading.CancellationToken.

Protected Methods

Dispose(bool)

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