| 126 | } |
| 127 | |
| 128 | void JobSystemService::Dispose() |
| 129 | { |
| 130 | Platform::AtomicStore(&ExitFlag, 1); |
| 131 | JobsSignal.NotifyAll(); |
| 132 | Platform::Sleep(1); |
| 133 | |
| 134 | for (int32 i = 0; i < ThreadsCount; i++) |
| 135 | { |
| 136 | if (Threads[i]) |
| 137 | { |
| 138 | Threads[i]->Kill(true); |
| 139 | Delete(Threads[i]); |
| 140 | Threads[i] = nullptr; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | Memory::DestructItems(JobContexts, (int32)JobContextsSize); |
| 145 | Platform::Free(JobContexts); |
| 146 | JobContexts = nullptr; |
| 147 | } |
| 148 | |
| 149 | int32 JobSystemThread::Run() |
| 150 | { |
nothing calls this directly
no test coverage detected