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
Mostrar archivo Open project: GridProtectionAlliance/openHistorian Class Usage Examples

Public Methods

Method 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 method

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

Reset() public method

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

SafeManualResetEvent() public method

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.
return System

Set() public method

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

WaitOne() public method

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