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

Method releaseThread

src/common/Task.cpp:318–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318void Coordinator::releaseThread(WorkerThread* thd)
319{
320 MutexLockGuard guard(m_mutex, FB_FUNCTION);
321
322 const WorkerThread::STATE thdState = thd->getState();
323 if (thdState != WorkerThread::IDLE)
324 {
325 fb_assert(thdState == WorkerThread::STOPPING || thdState == WorkerThread::SHUTDOWN);
326 return;
327 }
328
329 FB_SIZE_T pos;
330 if (m_activeThreads.find(thd, pos))
331 {
332 m_activeThreads.remove(pos);
333 m_idleThreads.push(thd);
334 }
335 else
336 {
337 fb_assert(false);
338
339 if (!m_idleThreads.find(thd, pos))
340 m_idleThreads.push(thd);
341 }
342}
343
344
345} // namespace Jrd

Callers

nothing calls this directly

Calls 4

getStateMethod · 0.45
findMethod · 0.45
removeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected