[Python-ideas] Cofunctions - Back to Basics
greg.ewing at canterbury.ac.nz
Sun Oct 30 22:16:23 CET 2011
Nick Coghlan wrote:
> The fact that greenlets exists (and works) demonstrates that it is
> possible to correctly manage and execute multiple Python stacks within
> a single OS thread.
I'm not convinced that greenlets work correctly under all
possible circumstances. As I understand, they work by copying
pieces of C stack in and out when switching tasks. That
fails if a pointer to local storage is kept anywhere that
can be reached by a different task. I seem to remember there
being an issue with Tk doing something like this and causing
problems for Stackless.
More information about the Python-ideas