Discrepancies between Go Playground and Go on my machine?
问题 To settle some misunderstandings I have about goroutines, I went to the Go playground and ran this code: package main import ( "fmt" ) func other(done chan bool) { done <- true go func() { for { fmt.Println("Here") } }() } func main() { fmt.Println("Hello, playground") done := make(chan bool) go other(done) <-done fmt.Println("Finished.") } As I expected, Go playground came back with an error: Process took too long . This seems to imply that the goroutine created within other runs forever.