[Python-ideas] Cofunctions PEP - Revision 4

Antoine Pitrou solipsis at pitrou.net
Sat Aug 14 18:57:32 CEST 2010


On Sat, 14 Aug 2010 20:40:52 +0400
Andrey Popp <8mayday at gmail.com> wrote:
> 2) That will affect code reusability a lot, because we can't mix
> cocalls and calls.
> 
> All this issues are solved with greenlet library and I think if Python
> needs cooperative threads they should have API and behave like
> greenlets.

As far as I understand, the only way Stackless and the like can make
things "transparent" is that they monkey-patch core socket
functionality (and perhaps other critical built-in functionalities).
"Soft" cooperative multithreading isn't naturally transparent, which
makes it quite different from OS-level multithreading.

Regards

Antoine.





More information about the Python-ideas mailing list