| 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 | |
| 46 | public: |
| 47 | GSJobQueue(std::function<void()> startup, std::function<void(T&)> func, std::function<void()> shutdown) |
nothing calls this directly
no test coverage detected