(self, fn, *args, **kwargs)
| 59 | self._update_progress() |
| 60 | |
| 61 | def submit(self, fn, *args, **kwargs) -> futures.Future: |
| 62 | future = self.executor.submit(fn, *args, **kwargs) |
| 63 | future.add_done_callback(self.completed_cb) |
| 64 | self.total += 1 |
| 65 | self.jobs.add(future) |
| 66 | self._update_progress() |
| 67 | return future |
| 68 | |
| 69 | def wait(self): |
| 70 | while not bool(self): |