Skip to content

Instantly share code, notes, and snippets.

@fsouza
Created October 26, 2011 23:58
Show Gist options
  • Save fsouza/1318382 to your computer and use it in GitHub Desktop.
Save fsouza/1318382 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
c := make(chan int, 4)
c <- 1
c <- 2
c <- 3
fmt.Println(<-c, <-c, <-c)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment