Initial commit

main
oabrivard 2 years ago
parent 8cd82c9f95
commit 7052c12ae1

2
.gitignore vendored

@ -1,3 +1,5 @@
.DS_Store
# ---> Go
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore

@ -0,0 +1,30 @@
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()")
}
Loading…
Cancel
Save