[Stackless] stackless and threads

Oren Tirosh oren-slp at hishome.net
Sun Jul 13 06:49:34 CEST 2003


On Sat, Jul 12, 2003 at 11:44:15PM +0200, Christian Tismer wrote:
> Vladimir Vukicevic wrote:
> 
> >Howdy..
> >
> >I've been playing with stackless for the past little while, and am
> >wondering how it interacts with native (OS) threads.  Python's native
> >threading situation is somewhat less-than-stellar anyway (global
> >interpreter lock); I'm wondering what happens when stackless is
> >introduced into a multithreaded app.
> 
> At the moment, under circumstances, it will crash.
> I had that complaint before. What I have to do at least
> is to avoid switches between tasklets from different threads.
> I don't know whether it makes sense to build real thread
> switching into tasklets, or just let them raise an exception.

Could stackless be used to reduce the stack requirements of each thread
so a larger number of native threads can be started simultaneously?

Yes, I realize that's not why you wrote stackless...

   Oren




More information about the Stackless mailing list