diff --git a/concurrency/hello/go.go b/concurrency/hello/go.go new file mode 100644 index 0000000..88d4579 --- /dev/null +++ b/concurrency/hello/go.go @@ -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 ") +}