C# Класс Universe.Framework.Utilities.ThreadMonitor

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
m_heartbeats List
m_lock Object
m_thread Thread
m_timesToIterate int

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

Метод Описание
CallAndWait ( int timeout, Heartbeat enumerator, bool &isRunning ) : bool

Call the method and wait for it to complete or the max time.

StartMonitor ( int timesToIterate, int sleepTime ) : void

Start the thread and run through the threads that are given.

StartTrackingThread ( int millisecondTimeOut, Heartbeat hb ) : void

Add this delegate to the tracker so that it can run.

Stop ( ) : void

Защищенные методы

Метод Описание
Run ( ) : void

Run the loop through the heartbeats.

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

CallAndWait() публичный статический Метод

Call the method and wait for it to complete or the max time.
public static CallAndWait ( int timeout, Heartbeat enumerator, bool &isRunning ) : bool
timeout int
enumerator Heartbeat
isRunning bool
Результат bool

Run() защищенный Метод

Run the loop through the heartbeats.
protected Run ( ) : void
Результат void

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

Start the thread and run through the threads that are given.
public StartMonitor ( int timesToIterate, int sleepTime ) : void
timesToIterate int /// The number of times to run the delegate. /// /// If you set this parameter to 0, it will loop infinitely. /// ///
sleepTime int /// The sleep time between each iteration. /// /// If you set this parameter to 0, it will loop without sleeping at all. /// The sleeping will have to be deal with in the delegates. /// ///
Результат void

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

Add this delegate to the tracker so that it can run.
public StartTrackingThread ( int millisecondTimeOut, Heartbeat hb ) : void
millisecondTimeOut int The time that the thread can run before it is forcefully stopped.
hb Heartbeat The delegate to run.
Результат void

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

public Stop ( ) : void
Результат void

Описание свойств

m_heartbeats защищенное свойство

protected List m_heartbeats
Результат List

m_lock защищенное свойство

protected Object m_lock
Результат Object

m_thread защищенное свойство

protected Thread m_thread
Результат Thread

m_timesToIterate защищенное свойство

protected int m_timesToIterate
Результат int