#include <TGo4AppControlTimer.h>
Public Methods | |
TGo4AppControlTimer (const TGo4AppControlTimer &right) | |
TGo4AppControlTimer (TGo4ThreadManager *manager, Long_t msperiod=3000, Bool_t mode=kTRUE) | |
virtual | ~TGo4AppControlTimer () |
TGo4AppControlTimer & | operator= (const TGo4AppControlTimer &right) |
void | SetManager (TGo4ThreadManager *parent) |
Sets reference to new thread manager. More... | |
virtual Bool_t | Notify () |
Routine called from TTimer on timeout. More... | |
const TCondition * | GetCondition () const |
Returns handle for internal condition which is used to block the gSystem. More... | |
void | SetApplicationRun (Bool_t flag=kTRUE) |
Switches between blocking and non blocking mode of the timer. More... | |
Bool_t | GetApplicationRun () |
Status of the application run flag. More... | |
Protected Attributes | |
TGo4ThreadManager * | fxManager |
Backlink to threadmanager who owns this timer. More... | |
Static Protected Attributes | |
UInt_t | fguTERMWAIT = 3000 |
time in ms to wait for all Runnables being stopped before Termination; after this time, the AllWaiting() of TGo4ThreadHandler is tested again, until the max number of testing cycles (fgiTERMWAITCYCLES) is reached; then Termination is done anyway. More... | |
Int_t | fgiTERMWAITCYCLES = 5 |
On Termination, Notify will test fgiTERMWAITCYCLES times if Runnables are stopped, i.e. More... | |
Private Methods | |
TGo4AppControlTimer () | |
Private Attributes | |
Bool_t | fbApplicationRun |
TCondition * | fxCondition |
Moreover, this timer calls Initialization() function of threadmanager, which can be overridden by user to define any actions which should not be run within a thread (critical root system calls, like opening TServerSocket, should be done within the application loop, i.e. in the timer). In threadmanager non-blocking-mode, Initialization() is called from timer regularly with the period specified in threadmanager; in blocking mode it is called once after each threadmanager UnBlockApp(). This timer is also responsible for proper termination of the threadmanager.
Definition at line 42 of file TGo4AppControlTimer.h.
|
Definition at line 30 of file TGo4AppControlTimer.cxx. References fbApplicationRun, fxCondition, fxManager, and TRACE. |
|
Definition at line 39 of file TGo4AppControlTimer.cxx. References fxCondition, fxManager, and TRACE. |
|
Definition at line 50 of file TGo4AppControlTimer.cxx. References fxCondition, and TRACE. |
|
|
|
Definition at line 61 of file TGo4AppControlTimer.cxx. References fbApplicationRun, fxCondition, fxManager, and TRACE. |
|
Sets reference to new thread manager.
Definition at line 55 of file TGo4AppControlTimer.h. References fxManager. |
|
Routine called from TTimer on timeout.
Definition at line 80 of file TGo4AppControlTimer.cxx. References TGo4ThreadHandler::AllWaiting(), TGo4Log::Debug(), fbApplicationRun, fgiTERMWAITCYCLES, fguTERMWAIT, fxCondition, fxManager, TGo4ThreadManager::GetWorkHandler(), TGo4ThreadManager::Initialization(), TGo4ThreadManager::IsTerminateApp(), TGo4ThreadManager::IsTerminating(), TGo4ThreadHandler::StopAll(), and TRACE. |
|
Returns handle for internal condition which is used to block the gSystem.
Definition at line 64 of file TGo4AppControlTimer.h. References fxCondition. Referenced by TGo4ThreadManager::UnBlockApp(). |
|
Switches between blocking and non blocking mode of the timer. If set to kTRUE, timer will not block the root system. If set to kFALSE, timer will suspend in a condition wait and therefore the InnerLoop() of root is blocked. Definition at line 72 of file TGo4AppControlTimer.h. References fbApplicationRun. Referenced by TGo4ThreadManager::BlockApp(), TGo4ThreadManager::TGo4ThreadManager(), and TGo4ThreadManager::UnBlockApp(). |
|
Status of the application run flag. If true, root application is _not_ blocked. Definition at line 160 of file TGo4AppControlTimer.cxx. References fbApplicationRun, and TRACE. Referenced by TGo4ThreadManager::UnBlockApp(). |
|
time in ms to wait for all Runnables being stopped before Termination; after this time, the AllWaiting() of TGo4ThreadHandler is tested again, until the max number of testing cycles (fgiTERMWAITCYCLES) is reached; then Termination is done anyway.
Definition at line 25 of file TGo4AppControlTimer.cxx. Referenced by Notify(). |
|
On Termination, Notify will test fgiTERMWAITCYCLES times if Runnables are stopped, i.e. all TGo4Threads are in TCondition wait (safe cancelling point); afterwards, threads are deleted anyway Definition at line 27 of file TGo4AppControlTimer.cxx. Referenced by Notify(). |
|
Backlink to threadmanager who owns this timer. @clientCardinality 1 @supplierCardinality 1 Definition at line 102 of file TGo4AppControlTimer.h. Referenced by Notify(), operator=(), SetManager(), and TGo4AppControlTimer(). |
|
Definition at line 106 of file TGo4AppControlTimer.h. Referenced by GetApplicationRun(), Notify(), operator=(), SetApplicationRun(), and TGo4AppControlTimer(). |
|
Definition at line 108 of file TGo4AppControlTimer.h. Referenced by GetCondition(), Notify(), operator=(), TGo4AppControlTimer(), and ~TGo4AppControlTimer(). |