Skip to content

Instantly share code, notes, and snippets.

@souvikhaldar
Created January 31, 2019 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souvikhaldar/39138b49874a491d00d89ad245c23e81 to your computer and use it in GitHub Desktop.
Save souvikhaldar/39138b49874a491d00d89ad245c23e81 to your computer and use it in GitHub Desktop.
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")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment