pitrou commented on code in PR #50687:
URL: https://github.com/apache/arrow/pull/50687#discussion_r3667678469
##########
python/pyarrow/src/arrow/python/flight.cc:
##########
@@ -86,6 +86,12 @@ PyFlightServer::PyFlightServer(PyObject* server, const
PyFlightServerVtable& vta
server_.reset(server);
}
+void PyFlightServer::ReleasePythonServerRef() {
+ // Resets OwnedRefNoGIL to break the reference cycle between the C++
FlightServerBase
+ // and the Python object.
+ server_.reset();
Review Comment:
Is it possible that a C++ Flight server method such as
`PyFlightServer::ListFlights` runs after this (for example from another thread)
and crashes when trying to dereference `server_`?
In other words, is this method only called after the gRPC server stopped
running?
--
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]