(self)
| 239 | _threads_queues[t] = self._work_queue |
| 240 | |
| 241 | def _initializer_failed(self): |
| 242 | with self._shutdown_lock: |
| 243 | self._broken = ('A thread initializer failed, the thread pool ' |
| 244 | 'is not usable anymore') |
| 245 | # Drain work queue and mark pending futures failed |
| 246 | while True: |
| 247 | try: |
| 248 | work_item = self._work_queue.get_nowait() |
| 249 | except queue.Empty: |
| 250 | break |
| 251 | if work_item is not None: |
| 252 | work_item.future.set_exception(self.BROKEN(self._broken)) |
| 253 | |
| 254 | def shutdown(self, wait=True, *, cancel_futures=False): |
| 255 | with self._shutdown_lock: |
no test coverage detected