This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author swapnil
Recipients anacrolix, ncoghlan, nikratio, swapnil, verigak
Date 2010-09-17.14:43:42
SpamBayes Score 1.1629139e-07
Marked as misclassified No
Message-id <1284734626.27.0.316654335805.issue6627@psf.upfronthosting.co.za>
In-reply-to
Content
As far as I know, the thread creation done in the file is not correct. While creating threads in C extension, there are certain rules to follow. Firstly, Python should be made thread-aware if it is not already i.e. call PyEval_InitThreads in the C callback function. After its creation, the thread should bootstrap to be able to execute Python code. It should create a new PyThreadState for itself by calling PyThreadState_New. For this, the thread should be passed the InterpreterState* through the entry function. Before executing any Python code, the thread should make sure that the current ThreadState * is corresponding to it by calling PyEval_RestoreThread.
Refer http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock
History
Date User Action Args
2010-09-17 14:43:46swapnilsetrecipients: + swapnil, ncoghlan, nikratio, verigak, anacrolix
2010-09-17 14:43:46swapnilsetmessageid: <1284734626.27.0.316654335805.issue6627@psf.upfronthosting.co.za>
2010-09-17 14:43:43swapnillinkissue6627 messages
2010-09-17 14:43:43swapnilcreate