Re: PyGILState_Ensure() deadlocks, why?

Liste des GroupesRevenir à cl python 
Sujet : Re: PyGILState_Ensure() deadlocks, why?
De : barry (at) *nospam* barrys-emacs.org (Barry)
Groupes : comp.lang.python
Date : 08. Jul 2024, 00:21:55
Autres entêtes
Message-ID : <mailman.17.1720392652.2981.python-list@python.org>
References : 1 2
User-Agent : iPad Mail (21F90)


On 7 Jul 2024, at 22:09, Tomas Ukkonen via Python-list <python-list@python..org> wrote:
 
    Py_Initialize();

You also need to tell python to init threading.
I think you are missing more python setup code before you can use threads.
Also i think you need to tell python that your thread wants to call into python.
But I an not near my dev system to research this for you.

I have code to use python from C++ in my pysvn project.
See the code starting a line 354 in https://sourceforge.net/p/pysvn/code/HEAD/tree/trunk/pysvn/Extension/Source/pysvn.cpp
That saves the thread state and restores it.

But in my case python creates the threads and I release and acquire the GIL.

Barry




Date Sujet#  Auteur
8 Jul 24 o Re: PyGILState_Ensure() deadlocks, why?1Barry

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal