Skip to content

Instantly share code, notes, and snippets.

@bmizerany
Created April 12, 2012 21:16
Show Gist options
  • Save bmizerany/2371039 to your computer and use it in GitHub Desktop.
Save bmizerany/2371039 to your computer and use it in GitHub Desktop.
func progress(permission, play, pause chan bool) {
for {
select {
case <-pause:
<-play
default:
permission <- true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment