[Stackless] Newbie question

Jay Shaffstall jshaffstall at gmail.com
Wed Sep 3 22:08:41 CEST 2008


I'm trying to use stackless in a simulation program, and I thought I
understood how it would work.  But my code isn't working that way, so
I wanted to run my understanding by the list.

I'd thought that each tasklet would run once, round robin style, with
all others getting run once before the first ran again.  A tasklet
that tried to receive on an empty channel would block, and when
another tasklet sent to that channel the first would unblock and go
back into the round robin queue.

Am I misunderstanding how stackless works?  Because what I think I'm
seeing is that the receiving tasklet runs immediately.  I don't have
any call to stackless.run, but as soon as I call send on a channel,
the receiving tasklet runs, rather than having the send queue up until
the tasklet is next up to run.

The simulation is a geological simulation, with a cubic region divided
into segments, and each segment reacting each time tick to the events
of those segments around it (as communicated via channels).

Jay




More information about the Stackless mailing list