Sobes.tech
Senior

O que o programa irá mostrar? Porquê? func main() { tempoInicio := time.Now() _, _ = <-worker(), <-worker() println(int(time.Since(tempoInicio).Seconds())) } func worker() chan int { ch := make(chan int) go func() { time.Sleep(3 * time.Second) ch <- 1 }() return ch }