Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created February 4, 2015 20:31
Show Gist options
  • Save yosmoc/2d989f8b871d6b532e2b to your computer and use it in GitHub Desktop.
Save yosmoc/2d989f8b871d6b532e2b to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func main() {
done := make(chan bool)
go func() {
time.Sleep(time.Second * 3)
done <- true
}()
<-done
fmt.Println("done")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment