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

Method waitForState

src/common/Task.cpp:99–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99bool WorkerThread::waitForState(STATE state, int timeout)
100{
101 while (m_state != state) // || m_state == old_state - consume old signals ?
102 {
103 if (timeout >= 0)
104 {
105 m_signalSem.tryEnter(0, timeout);
106 break;
107 }
108 else
109 m_signalSem.enter();
110 }
111
112 return (m_state == state);
113}
114
115void WorkerThread::shutdown(bool wait)
116{

Callers 3

waitForMethod · 0.80
runSyncMethod · 0.80
getThreadMethod · 0.80

Calls 2

tryEnterMethod · 0.45
enterMethod · 0.45

Tested by

no test coverage detected