MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / stop

Method stop

src/common/classes/TimerImpl.cpp:106–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void TimerImpl::stop()
107{
108 MutexLockGuard guard(m_mutex, FB_FUNCTION);
109
110 // Allow handler() to call stop()
111 if (m_handlerTid == Thread::getCurrentThreadId())
112 return;
113
114 // hvlad: it could be replaced by condition variable when we have good one for Windows
115 while (m_handlerTid)
116 {
117 MutexUnlockGuard unlock(m_mutex, FB_FUNCTION);
118 Thread::sleep(10);
119 }
120
121 if (!m_fireTime)
122 return;
123
124 m_fireTime = m_expTime = 0;
125
126 LocalStatus ls;
127 CheckStatusWrapper s(&ls);
128
129 ITimerControl* timerCtrl = TimerInterfacePtr();
130 timerCtrl->stop(&s, this);
131 check(&s);
132}
133
134} // namespace Firebird

Callers 1

resetMethod · 0.45

Calls 3

TimerInterfacePtrClass · 0.85
checkFunction · 0.70
sleepFunction · 0.50

Tested by

no test coverage detected