Stackless python and multicores?

So, I'm toying around with Stackless Python and a question popped up in my head, maybe this is "assumed" or "common" knowledge, but I couldn't find it actually written anywhere on the stackless site.

Does Stackless Python take advantage of multicore CPUs? In normal Python you have the GIL being constantly present and to make (true) use of multiple cores you need to use several processes, is this true for Stackless also?


Stackless python does not make use of any kind of multi-core environment it runs on. This is a common misconception about Stackless, as it allows the programmer to take advantage of thread-based programming. For many people these two are closely intertwined, but are, in fact two separate things.

Internally Stackless uses a round-robin scheduler to schedule every tasklet (micro threads), but no tasklet can be run concurrent with another one. This means that if one tasklet is busy, the others must wait until that tasklet relinquishes control. By default the scheduler will not stop a tasklet and give processor time to another. It is the tasklet's responsibility to schedule itself back in the end of the schedule queue using Stackless.schedule(), or by finishing its calculations.

all tasklets are thus executed in a sequential manner, even when multiplpe cores are available.

The reason why Stackless does not have multi-core support is because this makes threads a whole lot easier. And this is just what stackless is all about:

from the official stackless website

Stackless Python is an enhanced version of the Python programming language. It allows programmers to reap the benefits of thread-based programming without the performance and complexity problems associated with conventional threads. The microthreads that Stackless adds to Python are a cheap and lightweight convenience which can if used properly, give the following benefits:

  • Improved program structure.
  • More readable code.
  • Increased programmer productivity.

Here is a link to some more information about multiple cores and stackless.

Need Your Help

Passing props to React Router children routes

javascript coffeescript reactjs parent-child react-router

I'm having trouble overcoming an issue with react router. The scenario is that i need to pass children routes a set of props from a state parent component and route.

C#: How to get all public (both get and set) string properties of a type

c# reflection

I am trying to make a method that will go through a list of generic objects and replace all their properties of type string which is either null or empty with a replacement.