News for hackers. Stuff that matters.
Re:Go as an alternative to Node.js for Very Fast Servers by aaronblohowiak on Friday February 22, 2013 @12:30PM (#5265390)
> I think this is due to the go runtime allocating an OS thread for each goro as it goes through the socket close() blocking call. I think it has to do this to maintain concurrency

I highly doubt that it is creating a thread per goro on client disconnect. If you have a minimalish example of this, the golang mailing list would be very interested in working with you to identify what went wrong and create a patch if it is an issue with the Go implementation.

Re:Go as an alternative to Node.js for Very Fast Servers by tptacek on Friday February 22, 2013 @07:08PM (#5267813)
Blocking system calls spawn OS threads in Go, which can be cached and recycled for new goroutines. You don't see this if you code to pkg/net because it multiplexes i/o with a select/kqueue goroutine, but you'll see it right away if you code directly to the syscalls.

Close isn't a blocking call, though.

Re:Go as an alternative to Node.js for Very Fast Servers by _stephan on Saturday February 23, 2013 @09:00AM (#5269648)
Close is annotated as a blocking syscall in http://golang.org/src/pkg/syscall/syscall_linux.go#L810

Is there a guarantee on Linux that close can't block? (I suppose it depends on the file type and the definition of blocking.)

Re:Go as an alternative to Node.js for Very Fast Servers by tptacek on Saturday February 23, 2013 @11:44AM (#5270246)
Only if SO_LINGER is set.
Re:Go as an alternative to Node.js for Very Fast Servers by evmar on Friday February 22, 2013 @04:31PM (#5266986)
In case you didn't see it, I commented above with a link to a bug.