A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-April/118664.html below:

[Python-Dev] Meaning of the f_tstate field in the frame object

[Python-Dev] Meaning of the f_tstate field in the frame object [Python-Dev] Meaning of the f_tstate field in the frame objectMark Shannon mark at hotpy.org
Wed Apr 11 11:56:04 CEST 2012
What is the purpose of the f_tstate field in the frame object?
It holds a borrowed reference to the threadstate in which the frame
was created.

If PyThreadState_GET()->frame->f_state == PyThreadState_GET()
then it is redundant.

But what if PyThreadState_GET()->frame->f_state != PyThreadState_GET(),
which can happen when a generator is created in one thread and called in
another?

Removing the f_tstate field provides a clean fix to 
http://bugs.python.org/issue14432, but is it safe to do so?
I think it is safe, but does anyone think otherwise?

(Removing it requires the replacement of frame->f_state
with PyThreadState_GET() at one place in _PyEval_CallTracing)

Cheers,
Mark.
More information about the Python-Dev mailing list

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