I\'m embedding the python interpreter in a multithreaded C application and I\'m a little confused as to what APIs I should use to ensure thread safety.
From what I g
Eventually I figured it out. After
PyEval_InitThreads();
You need to call
PyEval_SaveThread();
While properly release the GIL for the main thread.