[Python-Dev] Extension modules, Threading, and the GIL

Martin v. Löwis martin@v.loewis.de
09 Jan 2003 11:30:47 +0100


Tim Peters <tim.one@comcast.net> writes:

> I'd like to intensify the problem, though:  you're in a thread and you want
> to call a Python API function safely.  Period.

Are there semantic requirements to the Python API in this context,
with respect to the state of global things? E.g. when I run the simple
string "import sys;print sys.modules", would I need to get the same
output that I get elsewhere? If yes, is it possible to characterize
"elsewhere" any better?

Regards,
Martin