Sign in
go
/
website
/
a1c9012b542bb9285233aa48a6c8b73a24c3b6a9
/
.
/
_content
/
tour
/
concurrency
/
goroutines.go
blob: 9efc83348e65048ee44141282fd297a0e537b361 [
file
] [
log
] [
blame
]
// +build OMIT
package main
import (
"fmt"
"time"
)
func say(s string) {
for i := 0; i < 5; i++ {
time.Sleep(100 * time.Millisecond)
fmt.Println(s)
}
}
func main() {
go say("world")
say("hello")
}