| 613 | |
| 614 | |
| 615 | class MultiprocessingPoolExecutor(Executor): |
| 616 | def __init__(self, pool): |
| 617 | self.pool = pool |
| 618 | self._max_workers = len(pool._pool) |
| 619 | |
| 620 | def submit(self, fn, *args, **kwargs): |
| 621 | return submit_apply_async(self.pool.apply_async, fn, *args, **kwargs) |
| 622 | |
| 623 | |
| 624 | def submit_apply_async(apply_async, fn, *args, **kwargs): |