Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Created February 4, 2015 20:33
Show Gist options
  • Save yosmoc/fb84e505e718eed8f9ad to your computer and use it in GitHub Desktop.
Save yosmoc/fb84e505e718eed8f9ad 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