()
| 1933 | raised_proper_exception = threading.Event() |
| 1934 | |
| 1935 | def block_read(): |
| 1936 | reader.read_chunk() |
| 1937 | read_first_message.set() |
| 1938 | stream_canceled.wait(timeout=5) |
| 1939 | try: |
| 1940 | reader.read_chunk() |
| 1941 | except flight.FlightCancelledError: |
| 1942 | with result_lock: |
| 1943 | raised_proper_exception.set() |
| 1944 | |
| 1945 | thread = threading.Thread(target=block_read, daemon=True) |
| 1946 | thread.start() |