[Python-Dev] _tkinter problem with Stackless

Christian Tismer tismer@tismer.com
Tue, 28 May 2002 04:04:40 -0700

Jack Jansen wrote:


> For that one case (tkinter), but not in general. Would it be possible to 
> somehow restructure this the other way around, i.e. not slice stacks 
> unless you know that all frames on the stack so far don't mind? I'm 
> thinking of something similar to BEGIN_ALLOW_THREADS: any naive 
> extension module whose author didn't know about Python threading will 
> still work fine in a threaded Python, because it'll just hold on to the 
> interpreter lock.

Yes I could do this and also considered it already:
This gets me into preparing a registry of all known
compatible extensions. I don't like to take on such a
role. Instead, I try to get the most popular stuff running,
wile notifying everybody else that her stuff won't work
without a bit of fiddling. At the time being, Stackless
can afford this slightly Etonian aproach...

> If this is impossible (which I can well imagine) then at the very least 
> we should have a macro KEEP_YOUR_DIRTY_FINGERS_OFF_MY_STACK() to tell 
> stackless that you've given away stack addresses to some external 
> package and you don't want your stack to be moved.

That's nearly exactly what I implemented for _tkinter:
does the good job.
Will check this in, tomorrow.

ciao - chris
Christian Tismer             :^)   <mailto:tismer@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  pager +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/