[Stackless] Implementing CSP

Christian Tismer tismer at stackless.com
Wed Jan 7 14:31:29 CET 2004

Hi Tom,

> Back in July, I posted about my interest in moving the CSP
> implementation along, and quickly vanished without trace. Well I'm still
> interested. In fact, this has pretty much bubbled up to the top of my to
> do list. It's looking dangerously likely that I'm going to roll up my
> sleeves and get this implemented.

Nice! I'd love that.

> I've just downloaded the latest source from CVS, and am in the process
> of getting my head around the overall architecture. This is the first C
> level Python hacking of any sort that I've done, so I'm looking at a bit
> of a learning curve.
> It's also a while since I've been in CSP mode, so I'm blowing the
> cobwebs out of that part of my brain too.
> Let's see, for full CSP we'll be needing...
> Channels, with blocking input and output - check

We got that.

> Timers - check? I've seen some evidence of this but I've not figured it
> out yet. Does the current scheduler implement a timer queue? If so, how
> does this interact with support for 'user schedulers'?

Did you say CSP or TCSP? :-)
No, we don't have timers, yet.
We also don't have priorities, which are needed
as well.
And the support for "user schedulers" has not developed
further at all, and I'm not so sure if and how this
should be done...


> First with building, which I haven't had a crack at yet. I've probably
> got an old copy of VC6 kicking around, but I'd rather go with cygwin or
> mingw. Should a simple "./configure; make" just work?

It should work on cygwin and with old VC6. I didn't switch
to VC7 since I don't have the money. Will have to, for
Python 2.4 :-/

> I'd also *really* appreciate some help with understanding the
> architecture. I know that's a hopelessly open ended request, but if
> anyone would care to post (or point me to) a short high-level
> description, I can drill down with more specific questions if/when I
> need to.

I will come back to that one!

> Perhaps a very brief glossary of important functions and data types?

help(stackless) will tell you most of it.

> I'll be slogging through this the hard way anyway, over the coming week.
> At least there's not too much code there - just 14 .c files in
> src/Stackless. Anywhere else I should be looking?

You don't need to care about the small assembly pieces, the
pickling support and such. Tasklets and channels are *it*,
and they don't hide much functionality, most is in the
doc strings.

ciao - chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list