Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active September 3, 2018 20:16
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 sw-samuraj/0226f3a4416129b0421d5040fc01c4e9 to your computer and use it in GitHub Desktop.
Save sw-samuraj/0226f3a4416129b0421d5040fc01c4e9 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i <= 9; i++ {
go func() { fmt.Println(i) }()
}
time.Sleep(100 * time.Millisecond)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment