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.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com