(done chan struct{})
| 195 | } |
| 196 | |
| 197 | func startDownScalingThreads(done chan struct{}) { |
| 198 | for { |
| 199 | select { |
| 200 | case <-done: |
| 201 | return |
| 202 | case <-time.After(downScaleCheckTime): |
| 203 | deactivateThreads() |
| 204 | } |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | // deactivateThreads checks all threads and removes those that have been inactive for too long |
| 209 | func deactivateThreads() { |
no test coverage detected