| 127 | } |
| 128 | |
| 129 | void MTGS::ShutdownThread() |
| 130 | { |
| 131 | if (!s_thread.Joinable()) |
| 132 | return; |
| 133 | |
| 134 | // just go straight to shutdown, don't wait-for-open again |
| 135 | s_shutdown_flag.store(true, std::memory_order_release); |
| 136 | if (IsOpen()) |
| 137 | WaitForClose(); |
| 138 | |
| 139 | // make sure the thread actually exits |
| 140 | s_sem_event.NotifyOfWork(); |
| 141 | s_thread.Join(); |
| 142 | } |
| 143 | |
| 144 | void MTGS::ThreadEntryPoint() |
| 145 | { |
nothing calls this directly
no test coverage detected