MCPcopy Create free account
hub / github.com/ddnet/ddnet / StartProcessor

Method StartProcessor

src/engine/client/backend_sdl.cpp:96–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void CGraphicsBackend_Threaded::StartProcessor(ICommandProcessor *pProcessor)
97{
98 dbg_assert(m_Shutdown, "Processor was already not shut down.");
99 m_Shutdown = false;
100 m_pProcessor = pProcessor;
101#if !defined(CONF_PLATFORM_EMSCRIPTEN)
102 std::unique_lock<std::mutex> Lock(m_BufferSwapMutex);
103 m_pThread = thread_init(ThreadFunc, this, "Graphics thread");
104 // wait for the thread to start
105 m_BufferSwapCond.wait(Lock, [this]() -> bool { return m_Started; });
106#endif
107}
108
109void CGraphicsBackend_Threaded::StopProcessor()
110{

Callers

nothing calls this directly

Calls 1

thread_initFunction · 0.85

Tested by

no test coverage detected