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

Method wait

src/remote/server/server.cpp:7270–7288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7268
7269
7270bool Worker::wait(int timeout)
7271{
7272 if (m_sem.tryEnter(timeout))
7273 return true;
7274
7275 MutexLockGuard guard(m_mutex, FB_FUNCTION);
7276 if (m_sem.tryEnter(0))
7277 return true;
7278
7279 // don't exit last worker until server shutdown
7280 if ((m_cntAll - m_cntGoing == 1) && !isShuttingDown())
7281 return true;
7282
7283 remove();
7284 m_going = true;
7285 m_cntGoing++;
7286
7287 return false;
7288}
7289
7290void Worker::setState(const bool active)
7291{

Callers 8

loopThreadFunction · 0.45
getCleanBufferMethod · 0.45
getDirtyBufferMethod · 0.45
waitForWorkersMethod · 0.45
ioBeginMethod · 0.45
lockBeginMethod · 0.45
lockWriteMethod · 0.45
lockReadMethod · 0.45

Calls 2

removeFunction · 0.85
tryEnterMethod · 0.45

Tested by

no test coverage detected