Merge pull request #305 from mrshu/master

chan chan string -> channel of string channels
This commit is contained in:
Adam Bard 2013-09-04 09:07:42 -07:00
commit 7694dddf06

View File

@ -251,7 +251,7 @@ func learnConcurrency() {
fmt.Println(<-c, <-c, <-c) // channel on right, <- is "receive" operator.
cs := make(chan string) // another channel, this one handles strings.
cc := make(chan chan string) // a channel of channels.
cc := make(chan chan string) // a channel of string channels.
go func() { c <- 84 }() // start a new goroutine just to send a value
go func() { cs <- "wordy" }() // again, for cs this time
// Select has syntax like a switch statement but each case involves