Heap problems in Mulithreaded Python extension

Alexander Eisenhuth newsuser at stacom-software.de
Thu Feb 1 13:05:15 EST 2007


ok, once more my "scheme"


python                  extension
-----------------------------------------------------
import extension
extension.init()  ->    PyEval_InitThreads();
                         setup 3 threads (pthreads) and do a lot
                         of things, but no python api calls
while true:
    time.sleep(0.1)

                         PyGILState_STATE gGILState;
                         gGILState = PyGILState_Ensure();
                         (...) // Do python API calls
                         PyGILState_Release(gGILState);



More information about the Python-list mailing list