[Python-ideas] Implementing Coroutines (was Cofunctions - Back to Basics)

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 29 09:16:59 CEST 2011


Mark Shannon wrote:

> In summary, the cofunction proposal is a work-around for a limitation in 
> the VM. By fixing the VM we can have proper coroutines.
> Surely, it is better to make the VM support the features we want/need 
> rather than bend those features to fit the VM?

The original version of Stackless worked by "flattening" the
interpreter the way you suggest, but it was considered far
too big an upheaval to consider incorporating into CPython,
especially since a lot of extension code would also have
to have been rewritten to make it coroutine-friendly.

-- 
Greg



More information about the Python-ideas mailing list