MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ThreadProc

Method ThreadProc

pcsx2/GS/GSJobQueue.h:28–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 Threading::WorkSema m_sema;
27
28 void ThreadProc()
29 {
30 if (m_startup)
31 m_startup();
32
33 while (true)
34 {
35 m_sema.WaitForWorkWithSpin();
36 if (m_exit)
37 break;
38 while (m_queue.consume_one(*this))
39 ;
40 }
41
42 if (m_shutdown)
43 m_shutdown();
44 }
45
46public:
47 GSJobQueue(std::function<void()> startup, std::function<void(T&)> func, std::function<void()> shutdown)

Callers

nothing calls this directly

Calls 2

WaitForWorkWithSpinMethod · 0.80
consume_oneMethod · 0.80

Tested by

no test coverage detected