MCPcopy Create free account
hub / github.com/brmmm3/fastthreadpool / _failed_thread

Method _failed_thread

fastthreadpool/fastthreadpool.py:281–303  ·  view source on GitHub ↗
(self, failed_callback)

Source from the content-addressed store, hash-verified

279 self._done_max_lock.acquire() #p
280
281 def _failed_thread(self, failed_callback):
282 failed_popleft = self._failed.popleft
283 logger_exception = None if self.logger is None else self.logger.exception
284 while True:
285 # noinspection PyBroadException
286 try:
287 if failed_callback is None:
288 if logger_exception is None:
289 while True:
290 failed_popleft()
291 else:
292 while True:
293 if self.result_id:
294 logger_exception(failed_popleft()[1])
295 else:
296 logger_exception(failed_popleft()[0])
297 else:
298 while True:
299 failed_callback(*failed_popleft())
300 except:
301 if self._shutdown:
302 break
303 self._failed_cnt.acquire()
304
305 def _cleanup_child(self):
306 if callable(self.finish_callback):

Callers

nothing calls this directly

Calls 1

acquireMethod · 0.80

Tested by

no test coverage detected