Go Tutorial #11: Goroutines — Lightweight Concurrency
In the previous tutorial, you learned how to organize a Go project. Now it is time for Go’s most powerful feature — goroutines. Goroutines are lightweight threads managed by the Go runtime. They are the reason Go is so popular for servers, microservices, and concurrent programs. You can run millions of goroutines on a single machine. What is a Goroutine? A goroutine is a function that runs concurrently with other goroutines. You start one with the go keyword: ...