Created
April 5, 2020 12:34
-
-
Save minhphong306/1f5faf8be0e618deb16ad012c1679443 to your computer and use it in GitHub Desktop.
vi_du_anh_khac.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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