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

Method _sample_frames

Lib/test/test_external_inspection.py:2754–2772  ·  view source on GitHub ↗

Wait for signal, sample frames with retry until required funcs present, send ack.

(
        self,
        client_socket,
        unwinder,
        wait_signal,
        send_ack,
        required_funcs,
        expected_frames=1,
    )

Source from the content-addressed store, hash-verified

2752 return None
2753
2754 def _sample_frames(
2755 self,
2756 client_socket,
2757 unwinder,
2758 wait_signal,
2759 send_ack,
2760 required_funcs,
2761 expected_frames=1,
2762 ):
2763 """Wait for signal, sample frames with retry until required funcs present, send ack."""
2764 _wait_for_signal(client_socket, wait_signal)
2765 frames = None
2766 for _ in range(MAX_TRIES):
2767 frames = self._get_frames_with_retry(unwinder, required_funcs)
2768 if frames and len(frames) >= expected_frames:
2769 break
2770 time.sleep(RETRY_DELAY)
2771 client_socket.sendall(send_ack)
2772 return frames
2773
2774 @skip_if_not_supported
2775 @unittest.skipIf(

Calls 4

_wait_for_signalFunction · 0.70
sleepMethod · 0.45
sendallMethod · 0.45

Tested by

no test coverage detected