Update range-over-channels.go
This commit is contained in:
parent
4f668ee955
commit
a12821076e
@ -13,6 +13,7 @@ func main() {
|
||||
queue := make(chan string, 2)
|
||||
queue <- "one"
|
||||
queue <- "two"
|
||||
// queue <- "three" // would deadlock, since the channel buffer is full
|
||||
close(queue)
|
||||
|
||||
// This `range` iterates over each element as it's
|
||||
|
Loading…
x
Reference in New Issue
Block a user