Junior — Senior
What result will the console output in example №15
livecode
Task condition
Determine what will be printed to the console after running the following program.
func main() {
timeStart := time.Now()
_, _ = <-worker(), <-worker()
println(int(time.Since(timeStart).Seconds()))
}
func worker() chan int {
ch := make(chan int)
go func() {
time.Sleep(3 * time.Second)
ch <- 1
}()
return ch
}