Message116891
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);
} |
|
Date |
User |
Action |
Args |
2010-09-19 23:04:15 | Rob.Watson | set | recipients:
+ Rob.Watson |
2010-09-19 23:04:15 | Rob.Watson | set | messageid: <1284937455.45.0.396725320878.issue9900@psf.upfronthosting.co.za> |
2010-09-19 23:04:11 | Rob.Watson | link | issue9900 messages |
2010-09-19 23:04:10 | Rob.Watson | create | |
|