[Stackless] Quick Update on Select() and Feedback
Andrew Francis
andrewfr_ice at yahoo.com
Fri Dec 18 20:51:46 CET 2009
Hi Folks:
I have started to prototype a Stackless select() function. For now
I want something similar to Go. I have success with the function using
stackless.py over CPython. Carl Boltz and Stephan Diehl have been
really helpful. I am still running tests and playing with
algorithms but the initial code is pretty straightforward. I am also
writing documentation that I will post later with a new version of
stackless.py. I am not sure how new features are handled in the PyPy
or for that matter Stackless world.
the signature is:
(channel, value) = stackless.select([cases])
case, a tuple of (channel, operation, value) where operation is
{RECEIVE, SEND}
RECEIVE = -1, SEND = 1
I have attached an initial version.
An early observation....
I am thinking to simplify implementing the code for C based Stackless
(as a subclass as per Richard Tew's suggestions), maybe two function
could be added to channel.
channel._queueTasklet(current tasklet, operation)
channel._removeTasklet(tasklet, operation)
Any feedback?
Cheers,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Select.py
Type: text/x-python
Size: 1959 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20091218/728ac9b0/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test5.py
Type: text/x-python
Size: 930 bytes
Desc: not available
URL: <http://www.stackless.com/pipermail/stackless/attachments/20091218/728ac9b0/attachment-0001.py>
More information about the Stackless
mailing list