[Stackless] Simple Threading Support

Richard Tew richard.m.tew at gmail.com
Sat Apr 12 01:38:34 CEST 2008

On Fri, Apr 11, 2008 at 3:32 PM, Paul Alvarez <palvarez at netenforcers.com> wrote:
>             I've just recently stumbled upon the stackless module and I'm
> very interested in its functionality. I have read quite a lot regarding it
> on the wiki and have yet to discover a working solution to my minor problem.
> I was hoping someone with more knowledge on stackless would be able to give
> me a simple solution as I am sure I am probably missing something obvious. I
> know this code is wrong as it is one of many variations I've come up with,
> but I can't figure out what I am doing wrong. Hopefully what I provide you
> will give you a good idea of what I'm trying to get an understanding of.
> Just for the record, I am using 2.5.2.

The thread_id of a tasklet is just that, the id of the thread the
tasklet belongs to.  It is not the id of the tasklet.  The best you
are goin gto get for that is id(tasklet).

Also you are using the scheduler wrong.  You are running it after you
create every single tasklet.

I suggest you read this:

And maybe look at some examples for illustration:


More information about the Stackless mailing list