[Python-Dev] Adding Python-Native Threads

Ronald Oussoren ronaldoussoren at mac.com
Sun Jun 26 12:17:53 CEST 2005


On 26-jun-2005, at 11:34, Adam Olsen wrote:


>
> To resolve these problems I propose adding lightweight cooperative
> threads to Python.  They can be built around a Frame object,  
> suspending
> and resuming like generators do.
>
> That much is quite easy.  Avoiding the C stack is a bit harder.
> However, it can be done if we introduce a new operator for threaded
> calls (which I refer to as non-atomic calls), which I propose be
> "func@()".  As a bonus this prevents any operation which doesn't use
> the non-atomic call syntax from triggering a thread switch  
> accidentally.

Have a look at stackless python. http://www.stackless.com/

Ronald



More information about the Python-Dev mailing list