The buffered channel example...

This commit is contained in:
Dan Buch 2012-11-07 00:16:13 -05:00
parent 97c9a95968
commit 6e17df80ab

View File

@ -0,0 +1,11 @@
package main
import "fmt"
func main() {
c := make(chan int, 2)
c <- 1
c <- 2
fmt.Println(<-c)
fmt.Println(<-c)
}