MCPcopy Create free account
hub / github.com/cisco/openh264 / GetIdleThread

Method GetIdleThread

codec/common/src/WelsThreadPool.cpp:325–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323}
324
325CWelsTaskThread* CWelsThreadPool::GetIdleThread() {
326 CWelsAutoLock cLock (m_cLockIdleTasks);
327
328 if (NULL == m_cIdleThreads || m_cIdleThreads->size() == 0) {
329 return NULL;
330 }
331
332 //fprintf(stdout, "CWelsThreadPool::GetIdleThread=%d\n", m_cIdleThreads->size());
333
334 CWelsTaskThread* pThread = m_cIdleThreads->begin();
335 m_cIdleThreads->pop_front();
336 return pThread;
337}
338
339int32_t CWelsThreadPool::GetBusyThreadNum() {
340 return (m_cBusyThreads?m_cBusyThreads->size():0);

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
beginMethod · 0.80
pop_frontMethod · 0.80

Tested by

no test coverage detected