checks if there are need for increasing or reducing thread count
(self)
| 229 | |
| 230 | #---------------------------------------------------------------------- |
| 231 | def checkThreadCount(self): |
| 232 | """checks if there are need for increasing or reducing thread count""" |
| 233 | |
| 234 | if len(self.threads) == self.core.config.get("download", "max_downloads"): |
| 235 | return True |
| 236 | elif len(self.threads) < self.core.config.get("download", "max_downloads"): |
| 237 | self.createThread() |
| 238 | else: |
| 239 | free = [x for x in self.threads if not x.active] |
| 240 | if free: |
| 241 | free[0].put("quit") |
| 242 | |
| 243 | |
| 244 | def cleanPycurl(self): |
no test coverage detected