title: Discrepancies between Go Playground and Go on my machine?
body: <p>To settle some misunderstandings I have about goroutines, I went to the Go playground and ran <a href="https://play.golang.org/p/2oEy6GKPDu" rel="nofollow">this code</a>:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  func other(done chan bool) {
      done &lt;- true
      go func() {
          for {
              fmt.Println("Here")
          }
      }()
  }
  
  func main() {
      fmt.Println("Hello, playground")
      done := make(chan bool)
      go other(done)
      &lt;-done
      fmt.Println("Finished.")
  }
  </code></pre>
  
  <p>As I expected, Go playground came back with an error: <em>Process took too long</em>.</p>
  
  <p>This seems to imply that the goroutine created within <code>other</code> runs forever.</p>
  
  <p>But when I run the same code on my own machine, I get this output almost instantaneously:</p>
  
  <pre><code>Hello, playground.
  Finished.
  </code></pre>
  
  <p>This seems to imply that the goroutine within <code>other</code> exits when the main goroutine finishes. <strong>Is this true? Or does the main goroutine finish, while the other goroutine continues to run in the background?</strong></p>