[Python-Dev] Adding Python-Native Threads
Michael Sparks
Michaels at rd.bbc.co.uk
Thu Jun 30 17:22:19 CEST 2005
On Sunday 26 Jun 2005 12:04, Adam Olsen wrote:
> On 6/26/05, Ronald Oussoren <ronaldoussoren at mac.com> wrote:
> > Have a look at stackless python. http://www.stackless.com/
> On 6/26/05, Florian Schulze <florian.proff.schulze at gmx.net> wrote:
> > Also look at greenlets, they are in the py lib http://codespeak.net/py
> While internally Stackless and Greenlets may (or may not) share a lot
> with my proposed python-native threads, they differ greatly in their
> intent and the resulting interface they expose.
Indeed - Greenlets allows you to build the functionality you propose without
having to change the language.
> > For example, with Greenlets you would use the .switch() method of a
> specific greenlet instance to switch to it, and with my python-native
> threads you would use the global idle() function which would decide
> for itself which thread to switch to.
This is easy enough to build using greenlets today. I tried writing an
experimental version of our generator scheduling system using greenlets
rather than generators and found it to work very nicely. I'd suggest that if
you really want this functionality (I can understand why) that you revisit
greenlets - they probably do what you want.
Mainly replying to say "-1",
Best Regards,
Michael.
--
Michael Sparks, Senior R&D Engineer, Digital Media Group
Michael.Sparks at rd.bbc.co.uk, http://kamaelia.sourceforge.net/
British Broadcasting Corporation, Research and Development
Kingswood Warren, Surrey KT20 6NP
This e-mail may contain personal views which are not the views of the BBC.
More information about the Python-Dev
mailing list