News for hackers. Stuff that matters.
Re:"Ruby developers need to stop using EventMachine. It's th... by aaronblohowiak on Thursday October 25, 2012 @01:04AM (#4696444)
Would you just select { case <- reader... case writer <- data..} ?

I know this isn't the same as posix select, but it does let you have one goroutine coordinate the hot potato..

Re:"Ruby developers need to stop using EventMachine. It's th... by tptacek on Thursday October 25, 2012 @07:20PM (#4700085)
That would require a goroutine for each socket to hot potato from the socket to a channel, right?
Re:"Ruby developers need to stop using EventMachine. It's th... by aaronblohowiak on Friday October 26, 2012 @03:44PM (#4703898)
Yes. This allows you to have the "when any of these socket's state changes" semantics in your controller/dispatcher function. I would like it if they had such an interface in stdlib...

If you really do just need to take data from one Reader and send it to a Writer, you can make a new Pipe.