C# Class GSF.Threading.SafeManualResetEvent

Provides a thread safe implementation of the ManualResetEvent class
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 indefinately.
Inheritance: IDisposable
Afficher le fichier Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void

Releases all the resources used by the SafeManualResetEvent object. Also signals all waiting threads and ignores all calls to Reset.

Reset ( ) : void

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.

SafeManualResetEvent ( bool signaledState ) : System

Creates a new SafeManualResetEvent

Set ( ) : void

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.

WaitOne ( ) : void

Blocks the current thread until Set or Dispose is called..

Method Details

Dispose() public méthode

Releases all the resources used by the SafeManualResetEvent object. Also signals all waiting threads and ignores all calls to Reset.
public Dispose ( ) : void
Résultat void

Reset() public méthode

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
public Reset ( ) : void
Résultat void

SafeManualResetEvent() public méthode

Creates a new SafeManualResetEvent
public SafeManualResetEvent ( bool signaledState ) : System
signaledState bool true to set the initial state signaled; false to set the initial state to nonsignaled.
Résultat System

Set() public méthode

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
public Set ( ) : void
Résultat void

WaitOne() public méthode

Blocks the current thread until Set or Dispose is called..
public WaitOne ( ) : void
Résultat void