MCPcopy Index your code
hub / github.com/RustPython/RustPython / _get_result

Method _get_result

Lib/test/libregrtest/run_workers.py:528–554  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

526 worker.wait_stopped(start_time)
527
528 def _get_result(self) -> QueueOutput | None:
529 pgo = self.runtests.pgo
530 use_faulthandler = (self.timeout is not None)
531
532 # bpo-46205: check the status of workers every iteration to avoid
533 # waiting forever on an empty queue.
534 while self.live_worker_count > 0:
535 if use_faulthandler:
536 faulthandler.dump_traceback_later(MAIN_PROCESS_TIMEOUT,
537 exit=True)
538
539 # wait for a thread
540 try:
541 result = self.output.get(timeout=PROGRESS_UPDATE)
542 if isinstance(result, WorkerThreadExited):
543 self.live_worker_count -= 1
544 continue
545 return result
546 except queue.Empty:
547 pass
548
549 if not pgo:
550 # display progress
551 running = get_running(self.workers)
552 if running:
553 self.log(running)
554 return None
555
556 def display_result(self, mp_result: MultiprocessResult) -> None:
557 result = mp_result.result

Callers 1

runMethod · 0.95

Calls 4

isinstanceFunction · 0.85
get_runningFunction · 0.85
getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected