I'd just like to chip in that for any embedded application using C, the greenlet approach is essential in order to work with an active C stack.
I'd also like to comment that in my opinion, preemtive scheduling of tasklets is a sure path to madness. In my experience, cooperative scheduling makes much more sense, and is what makes using stackless such a joy. However, if for any stackless lite, we were to need help from the sys.checkinterval() feature, then I think it would be a straightforward matter to extend standard python to be able to invoke callbacks during the checkinterval houskeeping. This would eliminate any need to do evil code injection at runtime. I have previously submitted code to that part of python, to be able to register a C callback to be called (once) next housekeeping interval. K > -----Original Message----- > From: [email protected] [mailto:stackless- > [email protected]] On Behalf Of Stephan Diehl > Sent: 3. febrúar 2010 18:14 > To: The Stackless Python Mailing List > Subject: Re: [Stackless] Planning Stackless Lite > > Hi Andrew, > > Andrew Francis wrote: > [...] > > > > So greenlets can be taken out of the stackless.py module if one > > is compiling to pypy-c? Again, pardon my lack of knowledge. In this > > context, what are greenlets providing? Does this imply that > stackless.py > > needs a minor rewriting? > > > there seems to be some kind of misunderstanding. > The pypy applevel stackless.py uses Coroutines in order to implement > its > functionality. These Coroutines are integral part of pypy if you > compile > it with the --stackless option. If you are using this stackless module > somewhere else, the coroutines are emulated by greenlets. So, in other > words, the greenlets are a fallback option if native Coroutines are not > available. > > Hope this make sense, Stephan > > _______________________________________________ > Stackless mailing list > [email protected] > http://www.stackless.com/mailman/listinfo/stackless _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
