C# Класс 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.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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..

Описание методов

Dispose() публичный Метод

Releases all the resources used by the SafeManualResetEvent object. Also signals all waiting threads and ignores all calls to Reset.
public Dispose ( ) : void
Результат void

Reset() публичный Метод

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
public Reset ( ) : void
Результат void

SafeManualResetEvent() публичный Метод

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.
Результат System

Set() публичный Метод

Sets the state of the event to signaled, allowing one or more waiting threads to proceed.
public Set ( ) : void
Результат void

WaitOne() публичный Метод

Blocks the current thread until Set or Dispose is called..
public WaitOne ( ) : void
Результат void