Skip to content

Commit

Permalink
apacheGH-40004: [Python][FlightRPC] Release GIL in GeneratorStream (a…
Browse files Browse the repository at this point in the history
…pache#40005)

Fixes apache#40004.

* Closes: apache#40004

Authored-by: lupko <[email protected]>
Signed-off-by: David Li <[email protected]>
  • Loading branch information
lupko authored Feb 8, 2024
1 parent de3cdc0 commit 8f15374
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/pyarrow/_flight.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2013,8 +2013,9 @@ cdef CStatus _data_stream_next(void* self, CFlightPayload* payload) except *:
max_attempts = 128
for _ in range(max_attempts):
if stream.current_stream != nullptr:
check_flight_status(
stream.current_stream.get().Next().Value(payload))
with nogil:
check_flight_status(
stream.current_stream.get().Next().Value(payload))
# If the stream ended, see if there's another stream from the
# generator
if payload.ipc_message.metadata != nullptr:
Expand Down

0 comments on commit 8f15374

Please sign in to comment.