[Stackless] Google's new Go programming language

Kristján Valur Jónsson kristjan at ccpgames.com
Tue Nov 17 22:59:17 CET 2009



> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless-
> bounces at stackless.com] On Behalf Of Guy Hulbert
> Here is the documentation (link from thread below):
> http://golang.org/doc/go_spec.html#Select_statements
> 
> >
> > One thing I'd like to point out is that the select() model of event
> > handling is inherently non-scalable. Managing it is an O(N) process
> > each time you want to send or handle an event.
Ok, it's clearer now.  It's just a compile-time construct.  There is no
select() for a list of channels.
> 
> According to this thread, it can be done in O(1):
> http://groups.google.com/group/golang-
> nuts/browse_thread/thread/3ba2157b3259ee54/410a3c8c187b1bf7?lnk=raot

Yes, but given a hypothetical array_of_channels_select(), you would still need
to go through the array and internally when setting up the goroutines that do the forwarding.  Only if you can set up that machinery once, you can have O(1)

K


More information about the Stackless mailing list