[Stackless] Stackless Multicore Module

Carlos Eduardo de Paula carlosedp at gmail.com
Tue Mar 25 19:54:03 CET 2008


Hi everyone,

I have created a small sandbox module to test running stackless
tasklets over multiple processes instead of multiple threads. With
whis we can overcome the problem with GIL and use full power from
multicore processors.

Its far from complete but it does the tasklet distribution on a
round-robin fashion and does the job of starting a scheduler for each
process.

The module depends on Processing
module(http://pypi.python.org/pypi/processing) which works the same
way threading does.

It still does not have a proper finalization, it means tha when all
tasklets finished, the manager tasklets consumes all CPU time and also
the channel communication does not work (i still dont know why).

I have put two examples just to test out the implementation.

If anyone is up to help me out in this idea or have suggestions,
please drop a line.

Regards,

Carlos

-- 
-------------------------------------------------------------------
Visit Stackless Examples Project
http://code.google.com/p/stacklessexamples/
Stackless Python - www.stackless.com
-------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stacklessmulticore.py
Type: text/x-python
Size: 2883 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080325/8ab171f3/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_smc.py
Type: text/x-python
Size: 1076 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080325/8ab171f3/attachment-0001.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_smc2.py
Type: text/x-python
Size: 755 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080325/8ab171f3/attachment-0002.py>


More information about the Stackless mailing list