Channels require goroutines. `<-variable` blocks the goroutine it  is in 
and waits for another goroutine to do the opposite, being `channel <- 
value` You can't use channels without goroutines, and really, the main 
purpose for goroutines is exactly about moving things through channels.

Goroutines probably are the most confusing and error prone part of Go, as 
it can be very hard to see who is loading the channel and who is not, and 
if they are in the same goroutine it won't work, as one part of it waits 
for the other part that will never start running, because it already is, 
and is blocked.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to