Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "fmt"
- "time"
- )
- func count(id int) {
- for i := 0; i < 10; i++ {
- fmt.Println(id, ":", "sheep")
- time.Sleep(time.Millisecond * 1000)
- }
- }
- func main() {
- for i := 0; i < 10; i++ {
- go count(i)
- time.Sleep(time.Millisecond * 11000)
- }
- }
Add Comment
Please, Sign In to add comment