(self)
| 228 | # works at capacity. |
| 229 | # |
| 230 | def run(self): |
| 231 | global all_workers_stop |
| 232 | while not all_workers_stop: |
| 233 | job = self.jobqueue.get() |
| 234 | if job is None: |
| 235 | # no jobs left in the queue, we're finished |
| 236 | self.busy = False |
| 237 | return |
| 238 | try: |
| 239 | job.go(self.machine, self.workdir) |
| 240 | except: |
| 241 | all_workers_stop = True |
| 242 | raise |
| 243 | |
| 244 | class PovrayJobQueue: |
| 245 |