[Stackless] multi-core processing?
Simon Pickles
sipickles at googlemail.com
Sun Jun 15 21:57:19 CEST 2008
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.
A few months ago, Carlos Eduardo de Paulo posted a code example on this
list for Stackless MultiCore. I've reattached the code for you here. I
haven't tested it or anything tho it looks good. You will need the
processing module:
http://pypi.python.org/pypi/processing
Hope that helps
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stacklessmulticore.py
Type: text/x-python
Size: 2786 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080615/4ef958ca/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_smc.py
Type: text/x-python
Size: 1035 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080615/4ef958ca/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_smc2.py
Type: text/x-python
Size: 724 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080615/4ef958ca/attachment-0002.py>
More information about the Stackless
mailing list