package main import( "time" "fmt" ) func main() { //start := time.Now() ch1 := make(chan int) ch2 := make(chan int) go func() { time.Sleep(2 * time.Second) ch1 <- 3 }() go func() { time.Sleep(3 * time.Second) ch2 <- 5 }() fmt.Println("blocking on read...") select { case <-ch1: fmt.Printf("ch1 case...\n") case <-ch2: fmt.Printf("ch2 case...\n") } }