Hi Peter:
--- On Sat, 5/15/10, Péter Szabó <[email protected]> wrote:
> Please be aware that it behaves very differently from real
> Stackless: it implements classes and methods named like those in
> Stackless, but they behave differently. But maybe for your use case the
> difference is not significant.
Well I have just implemented a new version of select support. This select is
implemented roughly the same way it is in Plan9. Now the API looks like.
tasklet.select(list of channel operations)
in this version, internally channel_action does not do much. The channel class
has two new methods (a suggestion of my friend Kevin) - receiveCase and
sendCase. Both these methods return channel operations. This works out nicely.
I need to put back in channel callbacks and channel preferences. channel_action
may disappear in a future version. Although the code is still raw, I can e-mail
you a version. Or post it somewhere - I don't think I can attach stackless.py
to this e-mail.
Once I finish the code, I would like to take another shot at using pypy
translate and creating a pypy-c implementation. If I have more time, I may
implement select() as a language feature.
That said, However the amount of changes of a Plan9 like select() in C based
Stackless Python is large. I have a version where changes are more localized
but I don't think it is as elegant.
> FYI This select thing quite interesting!
Thanks I think select is really interesting. Working with Python makes it a
pleasure to implement.
Hopefully the folks at Europython think so too :-) As another proof-of-concept,
I would like to implement join classes.
Cheers,
Andrew
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless