A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-January/032015.html below:

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

[Python-Dev] Extension modules, Threading, and the GILMark Hammond markh@skippinet.com.au
Thu, 9 Jan 2003 23:07:40 +1100
[Martin]
> 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?

Yes, good catch.  A PyInterpreterState must be known, and as you stated
previously, it is trivial to get one of these and stash it away globally.
The PyThreadState is the problem child.

Mark.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4