1
0
Fork 0

hello world for concurrency

This commit is contained in:
Stephen M. McQuay 2012-09-03 08:37:10 -06:00
parent a3f6157543
commit c45dcc9178
1 changed files with 18 additions and 0 deletions

18
concurrency/hello/go.go Normal file
View File

@ -0,0 +1,18 @@
package main
import (
"fmt"
"time"
)
func say(s string) {
for i := 0; i < 5; i++ {
time.Sleep(time.Millisecond * 100)
fmt.Print(s)
}
}
func main() {
go say("world!!\n")
say("hello ")
}