Re: pyarrow C++ API

2020-10-28 Thread Wes McKinney
Good to hear. We have an RAII-type helper that we use in C++ to make it easier to acquire and release the GIL in functions that need it https://github.com/apache/arrow/blob/master/cpp/src/arrow/python/common.h#L74 On Wed, Oct 28, 2020 at 2:08 PM James Thomas wrote: > > Thanks, Wes. Wrapping my C

Re: pyarrow C++ API

2020-10-28 Thread James Thomas
Thanks, Wes. Wrapping my C++ function with PyGILState_STATE state = PyGILState_Ensure(); ... PyGILState_Release(state); fixed the issue. On Wed, Oct 28, 2020 at 6:21 AM Wes McKinney wrote: > I haven't tried myself but my guess the problem is that your C++ > function does not acquire the GIL. W

Re: pyarrow C++ API

2020-10-28 Thread Wes McKinney
I haven't tried myself but my guess the problem is that your C++ function does not acquire the GIL. When ctypes invokes a native function, it releases the GIL. On Wed, Oct 28, 2020 at 4:29 AM James Thomas wrote: > > Hi, > > I am trying to run the following simple example after pip installing pand