| 192 | InitMutex<TimerEntry> timerHolder("TimerHolder"); |
| 193 | |
| 194 | void TimerEntry::cleanup() |
| 195 | { |
| 196 | { |
| 197 | MutexLockGuard guard(timerAccess, FB_FUNCTION); |
| 198 | |
| 199 | stopTimerThread.setValue(1); |
| 200 | timerWakeup->release(); |
| 201 | } |
| 202 | |
| 203 | timerCleanup->tryEnter(5); |
| 204 | timerThread.waitForCompletion(); |
| 205 | |
| 206 | while (timerQueue->hasData()) |
| 207 | { |
| 208 | ITimer* timer = NULL; |
| 209 | { |
| 210 | MutexLockGuard guard(timerAccess, FB_FUNCTION); |
| 211 | |
| 212 | TimerEntry* e = timerQueue->end(); |
| 213 | timer = (--e)->timer; |
| 214 | timerQueue->remove(e); |
| 215 | } |
| 216 | timer->release(); |
| 217 | } |
| 218 | } |
| 219 | |
| 220 | ISC_UINT64 curTime() |
| 221 | { |
no test coverage detected