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

Method getWorker

src/common/Task.cpp:258–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258Worker* Coordinator::getWorker()
259{
260 MutexLockGuard guard(m_mutex, FB_FUNCTION);
261 Worker* w = NULL;
262 if (!m_idleWorkers.isEmpty())
263 {
264 w = m_idleWorkers.pop();
265 m_activeWorkers.push(w);
266 }
267 return w;
268}
269
270void Coordinator::releaseWorker(Worker* w)
271{

Callers

nothing calls this directly

Calls 3

isEmptyMethod · 0.45
popMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected