Skip to content

Instantly share code, notes, and snippets.

@minhphong306
Created April 5, 2020 12:34
Show Gist options
  • Save minhphong306/1f5faf8be0e618deb16ad012c1679443 to your computer and use it in GitHub Desktop.
Save minhphong306/1f5faf8be0e618deb16ad012c1679443 to your computer and use it in GitHub Desktop.
vi_du_anh_khac.go
package main
import (
"fmt"
"time"
)
func test1(){
time.Sleep(100 * time.Millisecond)
fmt.Println("Trứng rán cần mỡ")
time.Sleep(100 * time.Millisecond)
fmt.Println("Yêu không cần cớ")
}
func test2(){
time.Sleep(150 * time.Millisecond)
fmt.Println("Bắp cần bơ")
time.Sleep(150 * time.Millisecond)
fmt.Println("Cần cậu cơ")
}
func main() {
go test1()
go test2()
time.Sleep(2 * time.Second)
fmt.Println("Good bye")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment