Destructor. Note ---- Called during garbage collection. This may be called later than expected. Always call shutdown() explicitly to avoid deadlocks.
(self)
| 374 | raise TypeError("initializer must be callable for PopenPoolExecutor") |
| 375 | |
| 376 | def __del__(self): |
| 377 | """Destructor. |
| 378 | |
| 379 | Note |
| 380 | ---- |
| 381 | Called during garbage collection. This may be called later than expected. |
| 382 | Always call shutdown() explicitly to avoid deadlocks. |
| 383 | """ |
| 384 | if not self._shutdown: |
| 385 | self.shutdown(wait=True) |
| 386 | |
| 387 | def shutdown(self, wait=True): |
| 388 | """Shutdown the executor and clean up resources. |