Re:Interview with Ryan Dahl, Creator of Node.js
by ploxiln on Thursday August 31, 2017 @03:02PM
(#15142858)
Well the thing is, Goroutines are not threads, they're coroutines. The go runtime uses up to a real thread per cpu core, and all your goroutines are run on those (fewer) real threads. The runtime also manages a shared thread pool for blocking syscalls e.g. local disk access and some kinds of name resolution depending on OS. But starting 10 goroutines is much cheaper than spawning 10 threads.
[ Parent
| on HN ]
There are no comments on this comment yet.