Hi Kristján:

--- On Tue, 11/17/09, Kristján Valur Jónsson <[email protected]> wrote:

> First off, I don't understand what select does in go,
>but I assume some conceptual similarity to unix select()

Select in Go allows a coroutine to wait on multiple channels (in Limbo,
I believe it is called alt, as in CSP). When a channel becomes active, 
it executes associated code. I believe a Go style select would 
simplify writing event handlers. 

some pseudo code to get the flavour what select does 

select:
    ready(userRequestChannel.receive()):
       tasklet(....)()

    ready(administrationRequestchannel.receive()):
       tasklet(.....)()

    ready(diagnosticsRequestChannel.receive()):
       tasklet(.....)()
 

> One thing I'd like to point out is that the select() model

...


> I believe that unix meanwhile has some similar way to avoid
> the scalability problems of select.

Yes UNIX select is bad. I think people use it for portability.
Otherwise on a UNIX system, a better choice would be EPOLL.

> Not having select() helps guide the stackless programmer
> around a bad pattern.

Although this is a different discussion, but I don't think that 
most Stackless programmers see select(), since they are using some higher
level library.

Cheers,
Andrew



      

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to