Fennel: TimerThread Class Reference (original) (raw)
TimerThread implements a timer callback via a dedicated thread. More...
#include <[TimerThread.h](TimerThread%5F8h-source.html)>
Inheritance diagram for TimerThread:

| Public Member Functions | |
|---|---|
| TimerThread (TimerThreadClient &clientInit) | |
| void | stop () |
| Stops (and joins) the timer thread. | |
| void | signalImmediate () |
| Requests an immediate execution of onTimerInterval() in the timer thread context. | |
| virtual void | start () |
| Spawns the OS thread. | |
| void | join () |
| Waits for the OS thread to terminate. | |
| bool | isStarted () const |
| **Returns:**true if start has been called (and subsequent join has not completed) | |
| bool | isStopped () const |
| **Returns:**opposite of isStarted() | |
| boost::thread & | getBoostThread () |
| Accesses the underlying boost::thread, e.g. | |
| std::string | getName () |
| void | setName (std::string const &s) |
| Protected Member Functions | |
| void | initAndRun () |
| virtual void | beforeRun () |
| virtual void | afterRun () |
| Protected Attributes | |
| boost::thread * | pBoostThread |
| bool | bRunning |
| std::string | name |
| Private Member Functions | |
| virtual void | run () |
| Private Attributes | |
| TimerThreadClient & | client |
| bool | bStop |
| StrictMutex | mutex |
| LocalCondition | condition |
Detailed Description
TimerThread implements a timer callback via a dedicated thread.
Once started, the thread runs until stop() is called.
Definition at line 58 of file TimerThread.h.
Constructor & Destructor Documentation
Member Function Documentation
| void TimerThread::run | ( | | ) | [private, virtual] | | --------------------- | - | | - | -------------------- |
| void TimerThread::stop | ( | | ) | | ---------------------- | - | | - |
| void TimerThread::signalImmediate | ( | | ) | | --------------------------------- | - | | - |
| void Thread::initAndRun | ( | | ) | [protected, inherited] | | ----------------------- | - | | - | ------------------------ |
| void Thread::beforeRun | ( | | ) | [protected, virtual, inherited] | | ---------------------- | - | | - | --------------------------------- |
| void Thread::afterRun | ( | | ) | [protected, virtual, inherited] | | --------------------- | - | | - | --------------------------------- |
| void Thread::start | ( | | ) | [virtual, inherited] | | ------------------ | - | | - | ---------------------- |
| void Thread::join | ( | | ) | [inherited] | | ----------------- | - | | - | ------------- |
| bool Thread::isStarted | ( | | ) | const [inline, inherited] | | ---------------------- | - | | - | --------------------------- |
| bool Thread::isStopped | ( | | ) | const [inline, inherited] | | ---------------------- | - | | - | --------------------------- |
| boost::thread& Thread::getBoostThread | ( | | ) | [inline, inherited] | | ------------------------------------- | - | | - | --------------------- |
Accesses the underlying boost::thread, e.g.
for use in a boost::thread_group. This thread must already be started.
Returns:
the underlying boost::thread
Definition at line 90 of file Thread.h.
| std::string Thread::getName | ( | | ) | [inline, inherited] | | --------------------------- | - | | - | --------------------- |
Definition at line 96 of file Thread.h.
00097 { 00098 return name; 00099 }
| void Thread::setName | ( | std::string const & | s | ) | [inline, inherited] |
|---|
Member Data Documentation
Definition at line 38 of file SynchMonitoredObject.h.
Referenced by ParallelExecStreamScheduler::abort(), LogicalTxnLog::checkpoint(), Database::checkpointImpl(), CheckpointThread::closeImpl(), LogicalTxnLog::commitTxn(), ParallelExecStreamScheduler::executeManager(), ParallelExecStreamScheduler::executeTask(), LogicalTxnLog::getOldestActiveTxnId(), LogicalTxnLog::newLogicalTxn(), ParallelExecStreamScheduler::readStream(), SXMutex::release(), GroupLock::release(), Database::requestCheckpoint(), CheckpointThread::requestCheckpoint(), LogicalTxnLog::rollbackTxn(), run(), CheckpointThread::run(), ThreadPoolBase::runPooledThread(), SXMutex::setSchedulingPolicy(), signalImmediate(), ParallelExecStreamScheduler::signalSentinel(), ThreadPoolBase::start(), stop(), ThreadPoolBase::stop(), ParallelExecStreamScheduler::stop(), ThreadPool< RandomAccessRequest >::submitTask(), ParallelExecStreamScheduler::tryExecuteManager(), ParallelExecStreamScheduler::tryExecuteTask(), SXMutex::tryUpgrade(), SXMutex::waitFor(), GroupLock::waitFor(), and Database::writeStats().
Definition at line 39 of file SynchMonitoredObject.h.
Referenced by ParallelExecStreamScheduler::abort(), Database::checkpointImpl(), CheckpointThread::closeImpl(), LogicalTxnLog::commitTxnWithGroup(), ParallelExecStreamScheduler::executeTask(), ParallelExecStreamScheduler::readStream(), SXMutex::release(), GroupLock::release(), Database::requestCheckpoint(), CheckpointThread::requestCheckpoint(), run(), CheckpointThread::run(), ThreadPoolBase::runPooledThread(), signalImmediate(), stop(), ThreadPoolBase::stop(), ParallelExecStreamScheduler::stop(), ThreadPool< RandomAccessRequest >::submitTask(), ParallelExecStreamScheduler::tryExecuteManager(), ParallelExecStreamScheduler::tryExecuteTask(), SXMutex::waitFor(), and GroupLock::waitFor().
The documentation for this class was generated from the following files:
- /home/pub/open/dev/fennel/synch/TimerThread.h
- /home/pub/open/dev/fennel/synch/TimerThread.cpp
