[Stackless] Google's new Go programming language
andrewfr_ice at yahoo.com
Mon Nov 23 21:53:28 CET 2009
--- On Mon, 11/23/09, Kristján Valur Jónsson <kristjan at ccpgames.com> wrote:
> I'd just like to point out that unix
> select() on sockets has the same kind of "problem." A
> select() call indicates that a recv() won't block.
> meanwhile someone else decides to recv() from that socket,
> before the caller of select() gets around to do that.
> This is not a race condition, it is just how select()
> is designed. It is up to the programmer to make sure
> that only a single sink is reading from that source.
Good analogy. At best, you could add extra machinery
and raise an exception. But select() would start to become unwieldy. In this regard, the programmer should know what they are doing.
Again, I don't think it would take that much effort to prototype a
lightweight stackless.select(). I would also like to bring PyPy
Stackless.py in line with Stackless by adding priorities (gives me a
way to understand priorities better). Much more effort to make it
a language feature. Need to get a few courses out of the way first.
More information about the Stackless