MCPcopy Create free account
hub / github.com/carbonengine/trinity / Fork

Method Fork

trinity/Tr2RenderContext.cpp:216–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216Tr2RenderContext* Tr2RenderContext::Fork()
217{
218 while( true )
219 {
220 m_parallelContextSemaphore.Wait();
221
222 CcpAutoMutex lock( m_parallelContextMutex );
223
224 if( m_parallelContextsPool.empty() )
225 {
226 continue;
227 }
228
229 auto ctx = m_parallelContextsPool.back();
230 m_parallelContextsPool.pop_back();
231 return ctx.Detach();
232 }
233}
234
235void Tr2RenderContext::Join( Tr2RenderContext* context )
236{

Callers 1

RenderSortedBatchesMethod · 0.80

Calls 3

emptyMethod · 0.80
DetachMethod · 0.80
WaitMethod · 0.45

Tested by

no test coverage detected