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 script is below:<br>
<br>import stackless<br><br>def testify(x, i):<br> n = 0<br> while n < x:<br> y = n * x<br> n += 1<br> stackless.schedule()<br> <br> print 'done', i, '!'<br> <br>
<br>stackless.tasklet(testify)(10000000, 1)<br>stackless.tasklet(testify)(10000000, 2)<br>stackless.tasklet(testify)(10000000, 3)<br>stackless.tasklet(testify)(10000000, 4)<br><br>stackless.run()<br><br><br><br>even though as i understand it stackless has an internal round-robin scheduler, this seemed like the only way i could think of to try to get it to distribute tasks across several cores. when i run this, however, i see a lot of activity on one core and only a little bit of activity on a second core. total cpu load taken up: 25% or so, never above. so i guess it's obvious that i'm barking up the wrong tree with this idea. is there a way to get stackless to distribute tasks across my cores more evenly? and if so, is 25% cpu load a hard-coded upper bound, or is the execution speed of the script perhaps held up more by memory access, for example?<br>
<br>sorry to newb up the ml, just trying to get a grip on some of the basics here.<br>= )<br>