title: I want to communicate between goroutines and block main thread indefinitely
body: <p>How do i block the the main func and allow goroutines communicate through channels the following code sample throws me an error</p>
  
  <p>0fatal error: all goroutines are asleep - deadlock!</p>
  
  <pre><code>package main
  
  import (
    "fmt"
    "time"
  )
  
  func main() {
     ch := make(chan int)
  
     go func() {
         value := &lt;-ch
         fmt.Print(value) // This never prints!
     }()
  
     go func() {
         for i := 0; i &lt; 100; i++ {
             time.Sleep(100 * time.Millisecond)
             ch &lt;- i
         }
     }()
  
     c := make(chan int)
     &lt;-c
  }
  </code></pre>