Re: PyGILState_Release called twice in embedded application

2023-03-23 Thread Barry
> On 23 Mar 2023, at 14:34, Arnaud Loonstra wrote: > > On 23-03-2023 13:33, Barry Scott wrote: On 23 Mar 2023, at 08:46, Arnaud Loonstra wrote: >>> >>> Hi all, >>> >>> I'm running in a crash due to a ResourceWarning (some socket is not closed >>> in a used module) after calling

Re: PyGILState_Release called twice in embedded application

2023-03-23 Thread Arnaud Loonstra
On 23-03-2023 13:33, Barry Scott wrote: On 23 Mar 2023, at 08:46, Arnaud Loonstra wrote: Hi all, I'm running in a crash due to a ResourceWarning (some socket is not closed in a used module) after calling PyGILState_Release. I'm running Python in a native thread (so a thread created by C

Re: PyGILState_Release called twice in embedded application

2023-03-23 Thread Barry Scott
> On 23 Mar 2023, at 08:46, Arnaud Loonstra wrote: > > Hi all, > > I'm running in a crash due to a ResourceWarning (some socket is not closed in > a used module) after calling PyGILState_Release. > > I'm running Python in a native thread (so a thread created by C not Python). > I'm

PyGILState_Release called twice in embedded application

2023-03-23 Thread Arnaud Loonstra
Hi all, I'm running in a crash due to a ResourceWarning (some socket is not closed in a used module) after calling PyGILState_Release. I'm running Python in a native thread (so a thread created by C not Python). I'm acquiring the GIL through PyGILState_Ensure before doing any CPYthon calls