[pypy-dev] Tealets Re: Stackless work
Andrew Francis
andrewfr_ice at yahoo.com
Mon May 23 23:14:12 CEST 2011
Hi Da_Blitz:
--- On Mon, 5/23/11, Da_Blitz <pypy at pocketnix.org> wrote:
> i have seen some tealets work but no documentation from
> what i have overheard it seems like stackless should be posible if
> someone devoes quite a bit of effort to it,
I just googled and I see work has been done. Too cool!
> got anymore info on this join pattern, i am hoping/assuming its not a fork >and join to offload to other cores as i am more concerned
> about having huge amounts of threads/tasklets
Join Patterns come out of JoCAML and Polyphonic C#. They are a concurrency mechanism. Hopefully, Join Patterns will allow a Stackless programmer to do stuff like
# block until all nine reindeer channels are ready to receive, OR
# any three of Santa's too many to count army of elves OR
# a timeout occurs
reindeer = [CUPID, DASHER, PRANCER, BLITZEN, DANCER, COMET, VIXEN, \
DONNER,RUDOLPH]
results = stackless.select(joinPattern(reindeer, joinPattern(elves, 3),
timeout)
if results == reindeer:
for result in reindeer:
# read data from each reindeer
.....
right now join patterns and stackless.select() are not official parts of C based Stackless Python or stackless.py
Cheers,
Andrew
More information about the pypy-dev
mailing list