LibreOffice Module salhelper (master) 1
|
Public Member Functions | |
TimerManager () | |
The timer manager cleanup has been removed (no thread is killed anymore), so the thread leaks. More... | |
void | registerTimer (salhelper::Timer *pTimer) |
register timer More... | |
void | unregisterTimer (salhelper::Timer const *pTimer) |
unregister timer More... | |
bool | lookupTimer (const salhelper::Timer *pTimer) |
lookup timer More... | |
Protected Member Functions | |
virtual void SAL_CALL | run () override |
worker-function of thread More... | |
void | checkForTimeout () |
Checking and triggering of a timer event. More... | |
Protected Attributes | |
salhelper::Timer * | m_pHead |
sorted-queue data More... | |
std::mutex | m_Lock |
List Protection. More... | |
osl::Condition | m_notEmpty |
Signal the insertion of a timer. More... | |
TimerManager::TimerManager | ( | ) |
The timer manager cleanup has been removed (no thread is killed anymore), so the thread leaks.
This will result in a GPF in case the salhelper-library gets unloaded before process termination.
@TODO : rewrite this file, so that the timerManager thread gets destroyed, when there are no timers anymore !
Definition at line 205 of file timer.cxx.
References create(), and m_notEmpty.
|
protected |
Checking and triggering of a timer event.
Definition at line 289 of file timer.cxx.
References salhelper::SimpleReferenceObject::acquire(), salhelper::TTimeValue::isEmpty(), salhelper::Timer::isExpired(), salhelper::Timer::m_aExpired, salhelper::Timer::m_aRepeatDelta, m_Lock, m_pHead, salhelper::Timer::m_pNext, salhelper::Timer::onShot(), registerTimer(), and salhelper::SimpleReferenceObject::release().
Referenced by run().
bool TimerManager::lookupTimer | ( | const salhelper::Timer * | pTimer | ) |
lookup timer
Definition at line 271 of file timer.cxx.
References m_Lock, m_pHead, and salhelper::Timer::m_pNext.
void TimerManager::registerTimer | ( | salhelper::Timer * | pTimer | ) |
register timer
Definition at line 214 of file timer.cxx.
References salhelper::Timer::expiresBefore(), m_Lock, m_notEmpty, m_pHead, and salhelper::Timer::m_pNext.
Referenced by checkForTimeout().
|
overrideprotectedvirtual |
worker-function of thread
Definition at line 329 of file timer.cxx.
References checkForTimeout(), salhelper::Timer::getRemainingTime(), m_Lock, m_notEmpty, and m_pHead.
void TimerManager::unregisterTimer | ( | salhelper::Timer const * | pTimer | ) |
unregister timer
Definition at line 249 of file timer.cxx.
References m_Lock, m_pHead, and salhelper::Timer::m_pNext.
|
protected |
List Protection.
Definition at line 52 of file timer.cxx.
Referenced by checkForTimeout(), lookupTimer(), registerTimer(), run(), and unregisterTimer().
|
protected |
Signal the insertion of a timer.
Definition at line 54 of file timer.cxx.
Referenced by registerTimer(), run(), and TimerManager().
|
protected |
sorted-queue data
Definition at line 50 of file timer.cxx.
Referenced by checkForTimeout(), lookupTimer(), registerTimer(), run(), and unregisterTimer().