You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
296 B
Go

package main
import (
"fmt"
)
func a(c chan bool) {
for i := 0; i < 50; i++ {
fmt.Print("a")
}
c <- true
}
func b(c chan bool) {
for i := 0; i < 50; i++ {
fmt.Print("b")
}
c <- true
}
func main() {
c := make(chan bool)
go a(c)
go b(c)
<- c
<- c
fmt.Println("end main()")
}