4 ms·
Thread usually means an in-process concurrency construct controlled by calls to the operating system. A goroutine is managed by the Go runtime. It's an importa
by lbarrow 13y ago
Thread usually means an in-process concurrency construct controlled by calls to the operating system. A goroutine is managed by the Go runtime.
It's an important distinction between using many (read: hundreds) of OS threads in a single process isn't performant, while using hundreds or even tens of thousands of goroutines is just fine.
- michaelfairley 13y agoGoroutines are green threads[1], and thus are threads, just like Ruby 1.8s threads are threads. Also, you can easily run 10s of thousands of kernel threads (provided you decrease the threads' stack size). 1: http://en.wikipedia.org/wiki/Green_threads http://en.wikipedia.org/wiki/Green_threads