Sign in
go
/
website
/
ac99473d6b53fbf59756fc1464e285493549254c
/
.
/
_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")
}