\ Spawn new workers as needed. This is where a worker process leaves the main loop of the master process.
(self)
| 737 | traceback.format_exc()) |
| 738 | |
| 739 | def spawn_workers(self): |
| 740 | """\ |
| 741 | Spawn new workers as needed. |
| 742 | |
| 743 | This is where a worker process leaves the main loop |
| 744 | of the master process. |
| 745 | """ |
| 746 | |
| 747 | for _ in range(self.num_workers - len(self.WORKERS)): |
| 748 | self.spawn_worker() |
| 749 | time.sleep(0.1 * random.random()) |
| 750 | |
| 751 | def kill_workers(self, sig): |
| 752 | """\ |
no test coverage detected