MCPcopy Index your code
hub / github.com/python/cpython / _initializer_failed

Method _initializer_failed

Lib/concurrent/futures/thread.py:241–252  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

_workerFunction · 0.80

Calls 2

get_nowaitMethod · 0.45
set_exceptionMethod · 0.45

Tested by

no test coverage detected