MCPcopy Create free account
hub / github.com/comaps/comaps / WaitForInitialization

Method WaitForInitialization

dev_sandbox/main_linux.cpp:323–339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 }
322
323 void WaitForInitialization(dp::GraphicsContext *) override
324 {
325 std::unique_lock<std::mutex> lock(m_initializationMutex);
326 if (m_isInitialized)
327 return;
328
329 m_initializationCounter++;
330 if (m_initializationCounter >= kGLThreadsCount)
331 {
332 m_isInitialized = true;
333 m_initializationCondition.notify_all();
334 }
335 else
336 {
337 m_initializationCondition.wait(lock, [this] { return m_isInitialized; });
338 }
339 }
340
341 bool IsDrawContextCreated() const override
342 {

Callers

nothing calls this directly

Calls 1

waitMethod · 0.80

Tested by

no test coverage detected