[Python-Dev] Last chance!

Christian Tismer tismer at tismer.com
Sun Dec 21 19:23:51 EST 2003

Tim Peters wrote:


> Your original was accepted:
>    http://mail.python.org/pipermail/python-dev/2003-December/041287.html

Yup, I wasn't aware of the DNS change.

>>My summary: f_tstate not needed!
> More, it seems conceptually flawed, albeit subtly.


Very much agreed. I always felt that f_tstate was not quite ok.
You spelled it and supplied more reason.

> Still, the possibility to switch threads across generator resumptions seems
> darned hard to view as "a feature".  I'd advise people not to rely on it
> <wink>.

Well, this might only work for generators if it is guaranteed
that the thread switch doesn't happen while the generator
is executing. I think this will give an exception. But most
probably the result will be hard to predict.

Other for my "tasklet" tiny threads. Their first purpose is
to have concurrent small tasks without interaction (or if
with interaction, then via channels and blocking). A tasklet
being interrupted by a thread switch will not be auto-schedulable
until the thread is resumed, but other tasklets might be, and
they don't need to care about which real thread is actually in
charge. This is one of my reasons why I want to get rid of
f_tstate -- it does not really apply to most of my frames.
Being tied to a thread is a property of the tasklet, and it
does not apply all the time, only when I have to keep C state.

ciao - chris

Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

More information about the Python-Dev mailing list