mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Don't hold GIL during Flight server shutdown
This commit is contained in:
1 parent
a1829b32c7
commit
0e61111541
1 file changed
+7
-2
@@ -972,5 +972,10 @@ cdef class FlightServerBase:
|
||||
request to finish. Instead, call this method from a background
|
||||
thread.
|
||||
"""
|
||||
if self.server.get() != NULL:
|
||||
self.server.get().Shutdown()
|
||||
# Must not hold the GIL: shutdown waits for pending RPCs to
|
||||
# complete. Holding the GIL means Python-implemented Flight
|
||||
# methods will never get to run, so this will hang
|
||||
# indefinitely.
|
||||
with nogil:
|
||||
if self.server.get() != NULL:
|
||||
self.server.get().Shutdown()
|
||||
Reference in new issue
Block a user