danepitkin commented on PR #34948:
URL: https://github.com/apache/arrow/pull/34948#issuecomment-1509176564

   Hmm interesting. From the Python C API docs[1] when acquiring the GIL:
   ```
   Note Calling this function from a thread when the runtime is finalizing will 
terminate the thread, even if the thread was not created by Python. You can use 
_Py_IsFinalizing() or 
[sys.is_finalizing()](https://docs.python.org/3/library/sys.html#sys.is_finalizing)
 to check if the interpreter is in process of being finalized before calling 
this function to avoid unwanted termination.
   ```
   
   I wonder if we should be checking for Py_IsFinalizing everywhere we acquire 
the GIL? 
   
   [1] https://docs.python.org/3/c-api/init.html#c.PyGILState_Ensure


-- 
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