[Stackless] question on preemtive scheduling semantics
senn at maya.com
Thu Mar 19 14:10:53 CET 2009
On Mar 19, 2009, at 5:49 AM, Mads Darø Kristensen wrote:
> I have built an execution environment using stackless, and in it I
> spawn a thread per CPU core so as to utilize the CPU properly. When
> I then schedule tasklets I alternate between inserting the tasklet
> from the different threads. This seems to work for me, i.e., I get
> 100% CPU utilization when executing multiple tasklets.
Hm. Do you mean "thread" or "process"? Because of the GIL you cannot
use threads to overlap python
execution within one interpreter (this has been discussed at great
length here many times...) --
depending on how you are measuring, perhaps you would aspire to get
200%, 400% ...etc for multicore....
More information about the Stackless