This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 080ce12  ARROW-2173: [C++/Python] Hold the GIL in NumPyBuffer 
destructor
080ce12 is described below

commit 080ce12b247d2722ae57b92c3ac89b0f558d1b0d
Author: Antoine Pitrou <anto...@python.org>
AuthorDate: Mon Feb 19 11:20:48 2018 -0500

    ARROW-2173: [C++/Python] Hold the GIL in NumPyBuffer destructor
    
    Author: Antoine Pitrou <anto...@python.org>
    
    Closes #1627 from pitrou/ARROW-2173-numpybuffer-gil and squashes the 
following commits:
    
    30ec23a0 [Antoine Pitrou] ARROW-2173: [C++/Python] Hold the GIL in 
NumPyBuffer destructor
---
 cpp/src/arrow/python/numpy_convert.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cpp/src/arrow/python/numpy_convert.cc 
b/cpp/src/arrow/python/numpy_convert.cc
index c2d055f..7ba1387 100644
--- a/cpp/src/arrow/python/numpy_convert.cc
+++ b/cpp/src/arrow/python/numpy_convert.cc
@@ -76,7 +76,10 @@ NumPyBuffer::NumPyBuffer(PyObject* ao) : Buffer(nullptr, 0) {
   }
 }
 
-NumPyBuffer::~NumPyBuffer() { Py_XDECREF(arr_); }
+NumPyBuffer::~NumPyBuffer() {
+  PyAcquireGIL lock;
+  Py_XDECREF(arr_);
+}
 
 #define TO_ARROW_TYPE_CASE(NPY_NAME, FACTORY) \
   case NPY_##NPY_NAME:                        \

-- 
To stop receiving notification emails like this one, please contact
w...@apache.org.

Reply via email to