[Python-ideas] Cofunctions - Back to Basics
Christian Tismer
tismer at stackless.com
Sat Oct 20 17:39:45 CEST 2012
Hi,
I found again a misunderstanding.
On 29.10.11 04:10, Nick Coghlan wrote:
> On Sat, Oct 29, 2011 at 8:40 AM, Ethan Furman <ethan at stoneleaf.us> wrote:
>> Greg Ewing wrote:
>>> Mark Shannon wrote:
>>>
>>>> Stackless provides coroutines. Greenlets are also coroutines (I think).
>>>>
>>>> Lua has them, and is implemented in ANSI C, so it can be done portably.
>>> These all have drawbacks. Greenlets are based on non-portable
>>> (and, I believe, slightly dangerous) C hackery, and I'm given
>>> to understand that Lua coroutines can't be suspended from
>>> within a C function.
>>>
>>> My proposal has limitations, but it has the advantage of
>>> being based on fully portable and well-understood techniques.
>> If Stackless has them, could we use that code?
> That's what the greenlets module *is* - the coroutine code from
> Stackless, lifted out and provided as an extension module instead of a
> forked version of the runtime.
>
No, the greenlet code is a subset of stackless.
Stackless could remove its greenlet part and become
an assembler-free implementation.
It would just not get over the C extension problem.
But that could then be handled by using the greenlet as an optional
external module.
(I think I said that before. Just wanted it to appear here)
--
Christian Tismer :^) <mailto:tismer at stackless.com>
Software Consulting : Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121 : *Starship* http://starship.python.net/
14482 Potsdam : PGP key -> http://pgp.uni-mainz.de
phone +49 173 24 18 776 fax +49 (30) 700143-0023
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-ideas
mailing list