Skip to content

Instantly share code, notes, and snippets.

@codeskyblue
Created September 4, 2013 03:32
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 codeskyblue/6432491 to your computer and use it in GitHub Desktop.
Save codeskyblue/6432491 to your computer and use it in GitHub Desktop.
what's the result?
package main
import "fmt"
import "time"
var ss = []string{"foo", "bar"}
func main() {
for _, name := range ss {
go func(){
fmt.Println(name)
}()
}
time.Sleep(1e9)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment