Cleanup after any worker processes which have exited due to reaching their specified lifetime. Returns True if any workers were cleaned up.
(pool)
| 288 | |
| 289 | @staticmethod |
| 290 | def _join_exited_workers(pool): |
| 291 | """Cleanup after any worker processes which have exited due to reaching |
| 292 | their specified lifetime. Returns True if any workers were cleaned up. |
| 293 | """ |
| 294 | cleaned = False |
| 295 | for i in reversed(range(len(pool))): |
| 296 | worker = pool[i] |
| 297 | if worker.exitcode is not None: |
| 298 | # worker exited |
| 299 | util.debug('cleaning up worker %d' % i) |
| 300 | worker.join() |
| 301 | cleaned = True |
| 302 | del pool[i] |
| 303 | return cleaned |
| 304 | |
| 305 | def _repopulate_pool(self): |
| 306 | return self._repopulate_pool_static(self._ctx, self.Process, |
no test coverage detected