
Jan. 8, 2003
5:26 a.m.
Mark Hammond wrote:
1) Allow "arbitrary" threads (that is, threads never before seen by Python) to acquire the resources necessary to call the Python C API.
This is possible today, all you need is a pointer to an interpreter state. If you have that, you can use PyThreadState_New, PyEval_AcquireThread, after which you have the resources necessary to call the Python API. In many cases, extensions can safely assume that there is exactly one interpreter state all the time, so they can safe the interpreter pointer in their init function. Regards, Martin