[Stackless] multi-core processing?

Jeff Senn senn at maya.com
Sun Jun 15 22:33:11 CEST 2008


On Jun 15, 2008, at 3:57 PM, Simon Pickles wrote:

> Hi NRB,
>
> Neutral Robot Boy wrote:
>> alright, so i'm still in 'beginner' mode with stackless here. i did  
>> a bit of reading which suggested that stackless should be able to  
>> distribute processing across multiple cores without trouble, and i  
>> decided to write a really simple script and look at how much of a  
>> load it puts on my cpu.
> The stackless scheduler which you activate by calling  
> stackless.run() only runs in one thread. Each tasklet is added to  
> that scheduler and called in turn. No other core will be used.

I suppose one should point out that this is not merely a limitation of  
Stackless.
e.g. running schedulers in more than one thread won't even help.

Python itself, even using multiple native threads, can only make use  
of one core
at a time due to the GIL (Global Interpreter Lock).  If you are  
interested
in the whys-and-wherefores, a search through the archives of this list
(and/or Google) will provide a bunch of discussions.

-Jas






More information about the Stackless mailing list