yuanpan365
yuanpan365
> CPython is not thread-safe. Don't try to use it from multiple threads. The called code adds a synchronisation mechanism.
> > The called code adds a synchronisation mechanism. > > > > Even if you synchronize your code, CPython cannot be called from a random thread without first acquiring...
> org.bytedeco.javacpp.nopointergc It is stuck directly after using PyGILState_Ensure
> That means it's not able to acquire it. You'll need to release it from the other thread where you acquired it to be able to continue in that thread....
> Try to follow the instructions from here: https://docs.python.org/3/c-api/init.html#non-python-created-threads According to your method, there will still be jvm exceptions