[issue43263] threading module unable to run

Steve Dower report at bugs.python.org
Thu Feb 25 18:18:02 EST 2021


Steve Dower <steve.dower at python.org> added the comment:

Sorry, I can't help. My employer has strict rules about reviewing GPL code like that in your linked repository.

I'd suggest checking your thread management in native code. Each new thread created in Python will create a new native thread, and they're all trying to acquire the GIL, so make sure you release it. I have no idea how you are waiting for the threads to complete their work, but you'll need to release the GIL while waiting (and maybe periodically reacquire it to check).

In general, I find it's best to treat embedded CPython as running as a separate process, even if it's just in separate threads. If you try and mix arbitrary Python code into your own application, things like this happen all the time. Whereas if you are doing inter-thread communication as if there are no shared objects, you'll often be fine.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43263>
_______________________________________


More information about the Python-bugs-list mailing list