New submission from Rob Watson <rmawat...@gmail.com>: Is the below a bug or a misuse of the api ? This was compiled with visual studio 2008 and python26 64bit
void testfunction() { for (int x = 1;x <= 100000;x++) { PyGILState_STATE gstate = PyGILState_Ensure(); PyRun_SimpleString("2 + 1"); PyGILState_Release(gstate); } } int main() { Py_Initialize(); PyEval_InitThreads(); PyEval_ReleaseLock(); boost::thread(boost::bind(testfunction)); // if this Sleep(100) is commented out, I will get "Python Fatal Error : This thread state must be current when releasing" Sleep(100); testfunction(); Sleep(1000000); } ---------- components: None messages: 116891 nosy: Rob.Watson priority: normal severity: normal status: open title: Threading Bug or misuse of the api ? type: crash versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9900> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com