pitrou commented on PR #50687:
URL: https://github.com/apache/arrow/pull/50687#issuecomment-5117372370

   Here's an idea: instead of:
   ```python
       def shutdown(self):
           with nogil:
               check_flight_status(self.server.get().Shutdown())
           self.server.get().ReleasePythonServerRef()
   ```
   
   How about we do:
   ```python
       def serve(self):
           self.server.get().SetPythonServerRef(self)
           try:
               with nogil:
                   check_flight_status(self.server.get().ServeWithSignals())
           finally:
               self.server.get().ReleasePythonServerRef()
   ```
   
   and avoid passing `self` in the `PyFlightServer` constructor?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to