SafeManualResetEvent Class

Provides a thread safe implementation of the ManualResetEvent class.

Definition

Namespace: SnapDB.Threading
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public sealed class SafeManualResetEvent : IDisposable
Inheritance
Object    SafeManualResetEvent
Implements
IDisposable

Remarks

While ManualResetEvent is mostly thread safe, calls to Dispose can cause other waiting threads to throw ObjectDisposedException. This class makes disposing of the class thread safe as well. Note: Not properly disposing of this class can cause all threads waiting on this class to wait indefinitely.

Constructors

SafeManualResetEvent Creates a new SafeManualResetEvent.

Methods

Dispose Releases all the resources used by the SafeManualResetEvent object. Also signals all waiting threads and ignores all calls to Reset.
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
Reset Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
Set Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
ToStringReturns a string that represents the current object.
(Inherited from Object)
WaitOne Blocks the current thread until Set or Dispose is called.

See Also